public class AtlasChecksGeoJSONDiffSubCommand extends JSONFlagDiffSubCommand
JSONFlagDiffSubCommand.DiffReturn, JSONFlagDiffSubCommand.JSONFlagDiff| Constructor and Description |
|---|
AtlasChecksGeoJSONDiffSubCommand() |
| Modifier and Type | Method and Description |
|---|---|
protected JSONFlagDiffSubCommand.JSONFlagDiff |
getDiff(java.util.HashMap source,
java.util.HashMap target,
JSONFlagDiffSubCommand.DiffReturn returnType)
Takes two
HashMaps containing atlas-checks flags mapped by id. |
protected boolean |
identicalFeatureIds(com.google.gson.JsonArray sourceArray,
com.google.gson.JsonArray targetArray)
Helper function for
getMissingAndChanged to check for changes in Atlas ids. |
protected void |
mapFeatures(org.openstreetmap.atlas.streaming.resource.File file,
java.util.HashMap map)
Parses an atlas-checks flag file and maps each flag to its id.
|
protected void |
writeSetToGeoJSON(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.
|
execute, getDescription, getGson, getName, getSource, getSourceSize, getTarget, switches, usageprotected void mapFeatures(org.openstreetmap.atlas.streaming.resource.File file,
java.util.HashMap map)
JSONFlagDiffSubCommandmapFeatures in class JSONFlagDiffSubCommandfile - File containing the flagsmap - HashMap to store the mapped flagsprotected JSONFlagDiffSubCommand.JSONFlagDiff getDiff(java.util.HashMap source, java.util.HashMap target, JSONFlagDiffSubCommand.DiffReturn returnType)
JSONFlagDiffSubCommandHashMaps containing atlas-checks flags mapped by id. Finds missing elements
in the target based on keys. Optionally computes changes in the AtlasObject ids found in each
flag.getDiff in class JSONFlagDiffSubCommandsource - HashMap of the flags to compare fromtarget - HashMap of the flags to compare toreturnType - JSONFlagDiffSubCommand.DiffReturn; If this is CHANGED the changed attribute of
the returned JSONFlagDiffSubCommand.JSONFlagDiff will be populated.JSONFlagDiffSubCommand.JSONFlagDiffprotected boolean identicalFeatureIds(com.google.gson.JsonArray sourceArray,
com.google.gson.JsonArray targetArray)
JSONFlagDiffSubCommandgetMissingAndChanged to check for changes in Atlas ids.identicalFeatureIds in class JSONFlagDiffSubCommandsourceArray - feature JsonArray to check fromtargetArray - feature JsonArray to check tosource are present in target, and visa versaprotected void writeSetToGeoJSON(java.util.Set<com.google.gson.JsonObject> flags,
org.openstreetmap.atlas.streaming.resource.File output)
JSONFlagDiffSubCommandwriteSetToGeoJSON in class JSONFlagDiffSubCommandflags - Set of JsonObjects representing geoJSON flagsoutput - File to output to