- Timestamp:
- 2016-02-23T21:01:34+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r9796 r9861 205 205 206 206 /** 207 * Constructs a new {@link LatLon}207 * Constructs a new object representing the given latitude/longitude. 208 208 * @param lat the latitude, i.e., the north-south position in degrees 209 209 * @param lon the longitude, i.e., the east-west position in degrees … … 217 217 } 218 218 219 /** 220 * Constructs a new object for the given coordinate 221 * @param coor the coordinate 222 */ 219 223 public LatLon(ICoordinate coor) { 220 224 this(coor.getLat(), coor.getLon()); … … 233 237 public static final String NORTH = trc("compass", "N"); 234 238 239 /** 240 * Formats the latitude part according to the given format 241 * @param d the coordinate format to use 242 * @return the formatted latitude 243 */ 235 244 public String latToString(CoordinateFormat d) { 236 245 switch(d) { … … 254 263 public static final String EAST = trc("compass", "E"); 255 264 265 /** 266 * Formats the longitude part according to the given format 267 * @param d the coordinate format to use 268 * @return the formatted longitude 269 */ 256 270 public String lonToString(CoordinateFormat d) { 257 271 switch(d) { … … 458 472 * 459 473 * @return rounded value 460 */ 474 * @deprecated Use {@link #roundToOsmPrecision(double)} instead 475 */ 476 @Deprecated 461 477 public static double roundToOsmPrecisionStrict(double value) { 462 478 return roundToOsmPrecision(value); … … 481 497 * 482 498 * @return a clone of this lat LatLon 483 */ 499 * @deprecated Use {@link #getRoundedToOsmPrecision()} instead 500 */ 501 @Deprecated 484 502 public LatLon getRoundedToOsmPrecisionStrict() { 485 return new LatLon( 486 roundToOsmPrecisionStrict(lat()), 487 roundToOsmPrecisionStrict(lon()) 488 ); 503 return getRoundedToOsmPrecision(); 489 504 } 490 505 … … 503 518 } 504 519 520 /** 521 * Converts this latitude/longitude to an instance of {@link ICoordinate}. 522 * @return a {@link ICoordinate} instance of this latitude/longitude 523 */ 505 524 public ICoordinate toCoordinate() { 506 525 return new org.openstreetmap.gui.jmapviewer.Coordinate(lat(), lon());
Note:
See TracChangeset
for help on using the changeset viewer.