Changeset 12745 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-09-05T21:48:18+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r12741 r12745 422 422 * @param separator values separator 423 423 * @return String in the format {@code "1.23456[separator]2.34567"} 424 */ 424 * @deprecated method removed without replacment 425 */ 426 @Deprecated 425 427 public String toStringCSV(String separator) { 426 428 return Utils.join(separator, Arrays.asList( -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java
r12725 r12745 5 5 import static org.openstreetmap.josm.tools.I18n.trn; 6 6 7 import java.util.Arrays; 7 8 import java.util.List; 8 9 … … 10 11 import org.openstreetmap.josm.data.conflict.Conflict; 11 12 import org.openstreetmap.josm.data.coor.EastNorth; 13 import org.openstreetmap.josm.data.coor.ILatLon; 14 import org.openstreetmap.josm.data.coor.conversion.DecimalDegreesCoordinateFormat; 12 15 import org.openstreetmap.josm.data.osm.BBox; 13 16 import org.openstreetmap.josm.data.osm.DataSet; … … 18 21 import org.openstreetmap.josm.data.osm.Way; 19 22 import org.openstreetmap.josm.tools.Geometry; 23 import org.openstreetmap.josm.tools.Utils; 20 24 import org.openstreetmap.josm.tools.date.DateUtils; 21 25 … … 159 163 } else if (o instanceof Way) { 160 164 addBbox(o); 161 add(tr("Centroid: "), Main.getProjection().eastNorth2latlon( 162 Geometry.getCentroid(((Way) o).getNodes())).toStringCSV(", ")); 165 add(tr("Centroid: "), 166 toStringCSV(", ", Main.getProjection().eastNorth2latlon( 167 Geometry.getCentroid(((Way) o).getNodes())))); 163 168 addWayNodes((Way) o); 164 169 } else if (o instanceof Relation) { … … 198 203 Double.toString(bottomRigth.east()), ", ", 199 204 Double.toString(topLeft.north())); 200 add(tr("Center of bounding box: "), bbox.getCenter().toStringCSV(", "));205 add(tr("Center of bounding box: "), toStringCSV(", ", bbox.getCenter())); 201 206 } 202 207 } … … 233 238 } 234 239 240 /** 241 * Returns lat/lon coordinate in human-readable format separated by {@code separator}. 242 * @param separator values separator 243 * @param ll the lat/lon 244 * @return String in the format {@code "1.23456[separator]2.34567"} 245 */ 246 private static String toStringCSV(String separator, ILatLon ll) { 247 return Utils.join(separator, Arrays.asList( 248 DecimalDegreesCoordinateFormat.INSTANCE.latToString(ll), 249 DecimalDegreesCoordinateFormat.INSTANCE.lonToString(ll) 250 )); 251 } 252 235 253 @Override 236 254 public String toString() {
Note:
See TracChangeset
for help on using the changeset viewer.