- Timestamp:
- 2011-07-12T20:47:58+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r4126 r4229 19 19 * We "inline" lat/lon rather than using a LatLon-object => reduces memory footprint 20 20 */ 21 static private final double COORDINATE_NOT_DEFINED = Double.NaN; 22 private double lat = COORDINATE_NOT_DEFINED; 23 private double lon = COORDINATE_NOT_DEFINED; 21 private double lat = Double.NaN; 22 private double lon = Double.NaN; 24 23 25 24 /* … … 30 29 31 30 private boolean isLatLonKnown() { 32 return lat != COORDINATE_NOT_DEFINED && lon != COORDINATE_NOT_DEFINED;31 return !Double.isNaN(lat) && !Double.isNaN(lon); 33 32 } 34 33 … … 84 83 public final EastNorth getEastNorth() { 85 84 if (!isLatLonKnown()) return null; 86 85 87 86 if (getDataSet() == null) 88 87 // there is no dataset that listens for projection changes 89 88 // and invalidates the cache, so we don't use the cache at all 90 89 return Projections.project(new LatLon(lat, lon)); 91 90 92 91 if (Double.isNaN(east) || Double.isNaN(north)) { 93 92 // projected coordinates haven't been calculated yet,
Note:
See TracChangeset
for help on using the changeset viewer.