diff --git a/src/org/openstreetmap/josm/data/osm/Node.java b/src/org/openstreetmap/josm/data/osm/Node.java
index cefa750..2da03cd 100644
|
a
|
b
|
public final class Node extends OsmPrimitive implements INode {
|
| 177 | 177 | @Override |
| 178 | 178 | void setDataset(DataSet dataSet) { |
| 179 | 179 | super.setDataset(dataSet); |
| 180 | | if (!isIncomplete() && (getCoor() == null || getEastNorth() == null)) |
| | 180 | if (!isIncomplete() && isVisible() && (getCoor() == null || getEastNorth() == null)) |
| 181 | 181 | throw new DataIntegrityProblemException("Complete node with null coordinates: " + toString() + get3892DebugInfo()); |
| 182 | 182 | } |
| 183 | 183 | |
diff --git a/src/org/openstreetmap/josm/io/OsmReader.java b/src/org/openstreetmap/josm/io/OsmReader.java
index 16ba365..24977c6 100644
|
a
|
b
|
public class OsmReader extends AbstractReader {
|
| 177 | 177 | |
| 178 | 178 | protected Node parseNode() throws XMLStreamException { |
| 179 | 179 | NodeData nd = new NodeData(); |
| 180 | | nd.setCoor(new LatLon(Double.parseDouble(parser.getAttributeValue(null, "lat")), Double.parseDouble(parser.getAttributeValue(null, "lon")))); |
| | 180 | String lat = parser.getAttributeValue(null, "lat"); |
| | 181 | String lon = parser.getAttributeValue(null, "lon"); |
| | 182 | if (lat != null && lon != null) { |
| | 183 | nd.setCoor(new LatLon(Double.parseDouble(lat), Double.parseDouble(lon))); |
| | 184 | } |
| 181 | 185 | readCommon(nd); |
| 182 | 186 | Node n = new Node(nd.getId(), nd.getVersion()); |
| 183 | 187 | n.setVisible(nd.isVisible()); |
diff --git a/src/org/openstreetmap/josm/io/OsmWriter.java b/src/org/openstreetmap/josm/io/OsmWriter.java
index b2fecde..0f9b097 100644
|
a
|
b
|
public class OsmWriter extends XmlWriter implements PrimitiveVisitor {
|
| 135 | 135 | public void visit(INode n) { |
| 136 | 136 | if (n.isIncomplete()) return; |
| 137 | 137 | addCommon(n, "node"); |
| 138 | | out.print(" lat='"+n.getCoor().lat()+"' lon='"+n.getCoor().lon()+"'"); |
| | 138 | if (n.getCoor() != null) { |
| | 139 | out.print(" lat='"+n.getCoor().lat()+"' lon='"+n.getCoor().lon()+"'"); |
| | 140 | } |
| 139 | 141 | if (!withBody) { |
| 140 | 142 | out.println("/>"); |
| 141 | 143 | } else { |