Changeset 2527 in josm for trunk/src


Ignore:
Timestamp:
2009-11-28T10:21:34+01:00 (15 years ago)
Author:
jttt
Message:

Added new test to DatasetConsistencyTest - ways with less than two nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java

    r2521 r2527  
    112112    }
    113113
     114    private void checkZeroNodesWays() {
     115        for (Way way:dataSet.getWays()) {
     116            if (way.isUsable() && way.getNodesCount() == 0) {
     117                writer.println(String.format("Way %s has zero nodes", way));
     118            } else if (way.isUsable() && way.getNodesCount() == 1) {
     119                writer.println(String.format("Way %s has only one node", way));
     120            }
     121        }
     122    }
     123
    114124    public void runTest() {
    115125        try {
     
    120130            searchWays();
    121131            refferedPrimitiveNotInDataset();
     132            checkZeroNodesWays();
    122133        } catch (Exception e) {
    123134            writer.println("Exception during dataset integrity test:");
Note: See TracChangeset for help on using the changeset viewer.