- Timestamp:
- 2012-07-12T08:45:22+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Node.java
r5249 r5326 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 } -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r5266 r5326 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()); -
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r5025 r5326 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("/>");
Note:
See TracChangeset
for help on using the changeset viewer.