Changeset 4229 in josm


Ignore:
Timestamp:
2011-07-12T20:47:58+02:00 (10 years ago)
Author:
jttt
Message:

Fix #6581 JOSM can't parse OSM data

File:
1 edited

Legend:

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

    r4126 r4229  
    1919     * We "inline" lat/lon rather than using a LatLon-object => reduces memory footprint
    2020     */
    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;
    2423
    2524    /*
     
    3029
    3130    private boolean isLatLonKnown() {
    32         return lat != COORDINATE_NOT_DEFINED && lon != COORDINATE_NOT_DEFINED;
     31        return !Double.isNaN(lat) && !Double.isNaN(lon);
    3332    }
    3433
     
    8483    public final EastNorth getEastNorth() {
    8584        if (!isLatLonKnown()) return null;
    86        
     85
    8786        if (getDataSet() == null)
    8887            // there is no dataset that listens for projection changes
    8988            // and invalidates the cache, so we don't use the cache at all
    9089            return Projections.project(new LatLon(lat, lon));
    91        
     90
    9291        if (Double.isNaN(east) || Double.isNaN(north)) {
    9392            // projected coordinates haven't been calculated yet,
Note: See TracChangeset for help on using the changeset viewer.