Index: src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/Node.java	(revision 6180)
+++ src/org/openstreetmap/josm/data/osm/Node.java	(working copy)
@@ -16,19 +16,17 @@
 public final class Node extends OsmPrimitive implements INode {
 
     /*
-     * We "inline" lat/lon rather than using a LatLon-object => reduces memory footprint
+     * the coordinates
      */
-    private double lat = Double.NaN;
-    private double lon = Double.NaN;
+    private LatLon latLon;
 
     /*
      * the cached projected coordinates
      */
-    private double east = Double.NaN;
-    private double north = Double.NaN;
+    private EastNorth eastNorth;
 
     private boolean isLatLonKnown() {
-        return !Double.isNaN(lat) && !Double.isNaN(lon);
+        return latLon != null;
     }
 
     @Override
@@ -56,8 +54,7 @@
 
     @Override
     public final LatLon getCoor() {
-        if (!isLatLonKnown()) return null;
-        return new LatLon(lat,lon);
+        return latLon;
     }
 
     /**
@@ -77,21 +74,20 @@
      */
     @Override
     public final EastNorth getEastNorth() {
-        if (!isLatLonKnown()) return null;
+        if (!isLatLonKnown())
+            return null;
 
         if (getDataSet() == null)
             // there is no dataset that listens for projection changes
             // and invalidates the cache, so we don't use the cache at all
-            return Projections.project(new LatLon(lat, lon));
+            return Projections.project(latLon);
 
-        if (Double.isNaN(east) || Double.isNaN(north)) {
+        if (eastNorth == null) {
             // projected coordinates haven't been calculated yet,
             // so fill the cache of the projected node coordinates
-            EastNorth en = Projections.project(new LatLon(lat, lon));
-            this.east = en.east();
-            this.north = en.north();
+            eastNorth = Projections.project(latLon);
         }
-        return new EastNorth(east, north);
+        return eastNorth;
     }
 
     /**
@@ -99,18 +95,13 @@
      */
     protected void setCoorInternal(LatLon coor, EastNorth eastNorth) {
         if (coor != null) {
-            this.lat = coor.lat();
-            this.lon = coor.lon();
+            this.latLon = coor;
             invalidateEastNorthCache();
         } else if (eastNorth != null) {
-            LatLon ll = Projections.inverseProject(eastNorth);
-            this.lat = ll.lat();
-            this.lon = ll.lon();
-            this.east = eastNorth.east();
-            this.north = eastNorth.north();
+            this.latLon = Projections.inverseProject(eastNorth);
+            this.eastNorth = eastNorth;
         } else {
-            this.lat = Double.NaN;
-            this.lon = Double.NaN;
+            latLon = null;
             invalidateEastNorthCache();
             if (isVisible()) {
                 setIncomplete(true);
@@ -209,7 +200,7 @@
         boolean locked = writeLock();
         try {
             super.cloneFrom(osm);
-            setCoor(((Node)osm).getCoor());
+            setCoor(((Node) osm).getCoor());
         } finally {
             writeUnlock(locked);
         }
@@ -232,24 +223,26 @@
         try {
             super.mergeFrom(other);
             if (!other.isIncomplete()) {
-                setCoor(((Node)other).getCoor());
+                setCoor(((Node) other).getCoor());
             }
         } finally {
             writeUnlock(locked);
         }
     }
 
-    @Override public void load(PrimitiveData data) {
+    @Override
+    public void load(PrimitiveData data) {
         boolean locked = writeLock();
         try {
             super.load(data);
-            setCoor(((NodeData)data).getCoor());
+            setCoor(((NodeData) data).getCoor());
         } finally {
             writeUnlock(locked);
         }
     }
 
-    @Override public NodeData save() {
+    @Override
+    public NodeData save() {
         NodeData data = new NodeData();
         saveCommonAttributes(data);
         if (!isIncomplete()) {
@@ -260,17 +253,18 @@
 
     @Override
     public String toString() {
-        String coorDesc = isLatLonKnown() ? "lat="+lat+",lon="+lon : "";
-        return "{Node id=" + getUniqueId() + " version=" + getVersion() + " " + getFlagsAsString() + " "  + coorDesc+"}";
+        String coorDesc = isLatLonKnown() ? "lat=" + latLon.lat() + ",lon=" + latLon.lon() : "";
+        return "{Node id=" + getUniqueId() + " version=" + getVersion() + " " + getFlagsAsString() + " " + coorDesc
+                + "}";
     }
 
     @Override
     public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
         if (!(other instanceof Node))
             return false;
-        if (! super.hasEqualSemanticAttributes(other))
+        if (!super.hasEqualSemanticAttributes(other))
             return false;
-        Node n = (Node)other;
+        Node n = (Node) other;
         LatLon coor = getCoor();
         LatLon otherCoor = n.getCoor();
         if (coor == null && otherCoor == null)
@@ -327,7 +321,6 @@
      * next time.
      */
     public void invalidateEastNorthCache() {
-        this.east = Double.NaN;
-        this.north = Double.NaN;
+        eastNorth = null;
     }
 }
Index: src/org/openstreetmap/josm/data/osm/NodeData.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/NodeData.java	(revision 6180)
+++ src/org/openstreetmap/josm/data/osm/NodeData.java	(working copy)
@@ -8,37 +8,24 @@
 
 public class NodeData extends PrimitiveData implements INode {
 
-    /*
-     * we "inline" lat/lon coordinates instead of using a LatLon => reduces memory footprint
-     */
-    private double lat = Double.NaN;
-    private double lon = Double.NaN;
+    private LatLon latLon;
 
-    public NodeData() {}
+    public NodeData() {
+    }
 
     public NodeData(NodeData data) {
         super(data);
         setCoor(data.getCoor());
     }
 
-    private boolean isLatLonKnown() {
-        return !Double.isNaN(lat) && !Double.isNaN(lon);
-    }
-
     @Override
     public LatLon getCoor() {
-        return isLatLonKnown() ? new LatLon(lat,lon) : null;
+        return latLon;
     }
 
     @Override
     public void setCoor(LatLon coor) {
-        if (coor == null) {
-            this.lat = Double.NaN;
-            this.lon = Double.NaN;
-        } else {
-            this.lat = coor.lat();
-            this.lon = coor.lon();
-        }
+        latLon = coor;
     }
 
     @Override
