Package org.openstreetmap.josm.data.osm
Class DatasetConsistencyTest
java.lang.Object
org.openstreetmap.josm.data.osm.DatasetConsistencyTest
This class can be used to run consistency tests on dataset. Any errors found will be written to provided PrintWriter.
Texts here should not be translated because they're not intended for users but for josm developers.
Texts here should not be translated because they're not intended for users but for josm developers.
- Since:
- 2500
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataSetprivate intprivate static final intprivate final PrintWriter -
Constructor Summary
ConstructorsConstructorDescriptionDatasetConsistencyTest(DataSet dataSet, Writer writer) Constructs a newDatasetConsistencyTest. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks for complete nodes without coordinates.voidChecks for complete ways with incomplete nodes.private voidcheckReferredPrimitive(OsmPrimitive primitive, OsmPrimitive parent) voidChecks that parent primitive is referred from its child membersvoidChecks for zero and one-node ways.private voidprintElapsedTime(Stopwatch stopwatch) private voidprintError(String type, String message, Object... args) voidChecks that referred primitives are present in dataset.voidrunTest()Runs test.static StringRuns test on the given dataset.voidChecks that nodes can be retrieved through their coordinates.voidChecks that ways can be retrieved through their bounding box.
-
Field Details
-
MAX_ERRORS
- See Also:
-
dataSet
-
writer
-
errorCount
-
-
Constructor Details
-
DatasetConsistencyTest
Constructs a newDatasetConsistencyTest.- Parameters:
dataSet- The dataset to testwriter- The writer used to write results
-
-
Method Details
-
printError
-
checkReferrers
Checks that parent primitive is referred from its child members -
checkCompleteWaysWithIncompleteNodes
Checks for complete ways with incomplete nodes. -
checkCompleteNodesWithoutCoordinates
Checks for complete nodes without coordinates. -
searchNodes
Checks that nodes can be retrieved through their coordinates. -
searchWays
Checks that ways can be retrieved through their bounding box. -
checkReferredPrimitive
-
referredPrimitiveNotInDataset
Checks that referred primitives are present in dataset. -
checkZeroNodesWays
Checks for zero and one-node ways. -
printElapsedTime
-
runTest
Runs test. -
runTests
Runs test on the given dataset.- Parameters:
dataSet- the dataset to test- Returns:
- the errors as string
-