Ticket #13570: 13570_area.patch
File 13570_area.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
39 39 protected static final int WRONG_ORDER_COASTLINE = 904; 40 40 41 41 private List<Way> coastlineWays; 42 private Area downloadedArea; 42 43 43 44 /** 44 45 * Constructor … … 51 52 public void startTest(ProgressMonitor monitor) { 52 53 super.startTest(monitor); 53 54 coastlineWays = new LinkedList<>(); 55 downloadedArea = null; 54 56 } 55 57 56 58 @Override … … 71 73 * Nodes outside the download area are special cases, we may not know enough about the connected ways. 72 74 */ 73 75 private void checkConnections() { 74 Area downloadedArea = null;75 76 for (Way w : coastlineWays) { 76 if (downloadedArea == null) {77 downloadedArea = w.getDataSet().getDataSourceArea();78 }79 77 int numNodes = w.getNodesCount(); 80 78 for (int i = 0; i < numNodes; i++) { 81 79 Node n = w.getNode(i); … … 237 235 238 236 if (isCoastline(way)) { 239 237 coastlineWays.add(way); 238 if (downloadedArea == null) { 239 downloadedArea = way.getDataSet().getDataSourceArea(); 240 } 240 241 } 241 242 } 242 243