Class AtlasChecksGeoJSONDiffSubCommand

  • All Implemented Interfaces:
    org.openstreetmap.atlas.utilities.runtime.FlexibleSubCommand

    public class AtlasChecksGeoJSONDiffSubCommand
    extends JSONFlagDiffSubCommand
    Takes 2 sets of atlas-checks geoJSON flag files and reports the number of additions, subtractions, and changed flags from reference to input. Optionally, the reported items can be written to new geoJSON files. Additions and subtractions are based on flag ids. Changes are calculated by differences in the Atlas ids of objects in a flag.
    • Constructor Detail

      • AtlasChecksGeoJSONDiffSubCommand

        public AtlasChecksGeoJSONDiffSubCommand()
    • Method Detail

      • mapFeatures

        protected java.util.Map<java.lang.String,​java.util.Map<java.util.Set<java.lang.String>,​com.google.gson.JsonObject>> mapFeatures​(org.openstreetmap.atlas.streaming.resource.File file)
        Description copied from class: JSONFlagDiffSubCommand
        Parses an atlas-checks flag file and maps each flag to its id.
        Specified by:
        mapFeatures in class JSONFlagDiffSubCommand
        Parameters:
        file - File containing the flags
        Returns:
        a 2d HashMap containing a HashMap of JsonObjects mapped to String feature ids, mapped to String check names.
      • writeSetToGeoJSON

        protected void writeSetToGeoJSON​(java.util.Map<java.lang.String,​java.util.Set<com.google.gson.JsonObject>> flags,
                                         org.openstreetmap.atlas.streaming.resource.File output)
        Description copied from class: JSONFlagDiffSubCommand
        Writes a Set of geoJSON atlas-checks flags to a file.
        Overrides:
        writeSetToGeoJSON in class JSONFlagDiffSubCommand
        Parameters:
        flags - Set of JsonObjects representing geoJSON flags
        output - File to output to