Class AtlasChecksGeoJSONDiffSubCommand
- java.lang.Object
-
- org.openstreetmap.atlas.checks.commands.JSONFlagDiffSubCommand
-
- org.openstreetmap.atlas.checks.commands.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 Summary
Constructors Constructor Description AtlasChecksGeoJSONDiffSubCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)Parses an atlas-checks flag file and maps each flag to its id.protected voidwriteSetToGeoJSON(java.util.Map<java.lang.String,java.util.Set<com.google.gson.JsonObject>> flags, org.openstreetmap.atlas.streaming.resource.File output)Writes a Set of geoJSON atlas-checks flags to a file.-
Methods inherited from class org.openstreetmap.atlas.checks.commands.JSONFlagDiffSubCommand
execute, getDescription, getDiff, getGson, getInput, getName, getReference, getReferenceSize, switches, usage
-
-
-
-
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:JSONFlagDiffSubCommandParses an atlas-checks flag file and maps each flag to its id.- Specified by:
mapFeaturesin classJSONFlagDiffSubCommand- Parameters:
file-Filecontaining the flags- Returns:
- a 2d
HashMapcontaining aHashMapofJsonObjects mapped toStringfeature ids, mapped toStringcheck 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:JSONFlagDiffSubCommandWrites a Set of geoJSON atlas-checks flags to a file.- Overrides:
writeSetToGeoJSONin classJSONFlagDiffSubCommand- Parameters:
flags-SetofJsonObjects representing geoJSON flagsoutput-Fileto output to
-
-