- Timestamp:
- 2023-03-01T15:17:42+01:00 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java
r18553 r18678 12 12 import org.openstreetmap.josm.data.SystemOfMeasurement; 13 13 import org.openstreetmap.josm.data.conflict.Conflict; 14 import org.openstreetmap.josm.data.coor.EastNorth; 14 15 import org.openstreetmap.josm.data.coor.ILatLon; 15 16 import org.openstreetmap.josm.data.coor.LatLon; … … 173 174 } else if (o instanceof IWay) { 174 175 addBbox(o); 175 add(tr("Centroid: "), toStringCSV(false, 176 ProjectionRegistry.getProjection().eastNorth2latlon(Geometry.getCentroid(((IWay<?>) o).getNodes())))); 176 final EastNorth centroid = Geometry.getCentroid(((IWay<?>) o).getNodes()); 177 final String centroidMessage; 178 if (centroid == null) { 179 centroidMessage = tr("unknown"); 180 } else { 181 centroidMessage = toStringCSV(false, 182 ProjectionRegistry.getProjection().eastNorth2latlon(centroid)); 183 } 184 add(tr("Centroid: "), centroidMessage); 177 185 if (o instanceof Way) { 178 186 double length = ((Way) o).getLength();
Note:
See TracChangeset
for help on using the changeset viewer.