Changeset 17737 in josm for trunk/scripts
- Timestamp:
- 2021-04-11T09:42:30+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.java
r17454 r17737 1037 1037 Coordinate ept = ep.get(nump); 1038 1038 Coordinate jpt = jp.get(nump); 1039 if ( Math.abs(ept.getLat()-jpt.getLat()) > 0.00001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.00001)1039 if (differentCoordinate(ept.getLat(), jpt.getLat()) || differentCoordinate(ept.getLon(), jpt.getLon())) 1040 1040 err = true; 1041 1041 } … … 1057 1057 Coordinate ept = ep.get(nump); 1058 1058 Coordinate jpt = jp.get(nump); 1059 if ( Math.abs(ept.getLat()-jpt.getLat()) > 0.00001 || Math.abs(ept.getLon()-jpt.getLon()) > 0.00001) {1059 if (differentCoordinate(ept.getLat(), jpt.getLat()) || differentCoordinate(ept.getLon(), jpt.getLon())) { 1060 1060 String numtxt = Integer.toString(enums+1); 1061 1061 if (enums != jnums) { … … 1091 1091 } 1092 1092 } 1093 } 1094 1095 private boolean differentCoordinate(double v1, double v2) { 1096 double epsilon = 0.00001; 1097 return Math.abs(v1 - v2) > epsilon; 1093 1098 } 1094 1099 … … 1290 1295 } 1291 1296 ImageryBounds b = j.getBounds(); 1292 if (b.getMinLat() != minlat || b.getMinLon() != minlon || b.getMaxLat() != maxlat || b.getMaxLon() != maxlon) { 1297 if (differentCoordinate(b.getMinLat(), minlat) 1298 || differentCoordinate(b.getMinLon(), minlon) 1299 || differentCoordinate(b.getMaxLat(), maxlat) 1300 || differentCoordinate(b.getMaxLon(), maxlon)) { 1293 1301 myprintln("* Bounds do not match shape (is "+b.getMinLat()+","+b.getMinLon()+","+b.getMaxLat()+","+b.getMaxLon() 1294 1302 + ", calculated <bounds min-lat='"+minlat+"' min-lon='"+minlon+"' max-lat='"+maxlat+"' max-lon='"+maxlon+"'>): "
Note:
See TracChangeset
for help on using the changeset viewer.