Changeset 6500 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r6380 r6500 21 21 /** 22 22 * LatLon are unprojected latitude / longitude coordinates. 23 * 23 * <br> 24 * <b>Latitude</b> specifies the north-south position in degrees 25 * where valid values are in the [-90,90] and positive values specify positions north of the equator. 26 * <br> 27 * <b>Longitude</b> specifies the east-west position in degrees 28 * where valid values are in the [-180,180] and positive values specify positions east of the prime meridian. 29 * <br> 30 * <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Latitude_and_Longitude_of_the_Earth.svg/500px-Latitude_and_Longitude_of_the_Earth.svg.png"> 31 * <br> 24 32 * This class is immutable. 25 33 * … … 41 49 */ 42 50 public static final LatLon ZERO = new LatLon(0, 0); 43 51 44 52 private static DecimalFormat cDmsMinuteFormatter = new DecimalFormat("00"); 45 53 private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0"); … … 160 168 } 161 169 170 /** 171 * Constructs a new {@link LatLon} 172 * @param lat the latitude, i.e., the north-south position in degrees 173 * @param lon the longitude, i.e., the east-west position in degrees 174 */ 162 175 public LatLon(double lat, double lon) { 163 176 super(lon, lat); … … 168 181 } 169 182 183 /** 184 * Returns the latitude, i.e., the north-south position in degrees. 185 * @return the latitude 186 */ 170 187 public double lat() { 171 188 return y; … … 184 201 } 185 202 203 /** 204 * Returns the longitude, i.e., the east-west position in degrees. 205 * @return the longitude 206 */ 186 207 public double lon() { 187 208 return x; … … 229 250 /** 230 251 * Check if this is contained in given area or area is null. 231 * 252 * 232 253 * @param a Area 233 254 * @return <code>true</code> if this is contained in given area or area is null. … … 304 325 /** 305 326 * Returns the euclidean distance from this {@code LatLon} to a specified {@code LatLon}. 306 * 327 * 307 328 * @param ll the specified coordinate to be measured against this {@code LatLon} 308 329 * @return the euclidean distance from this {@code LatLon} to a specified {@code LatLon} … … 315 336 /** 316 337 * Returns the square of the euclidean distance from this {@code LatLon} to a specified {@code LatLon}. 317 * 338 * 318 339 * @param ll the specified coordinate to be measured against this {@code LatLon} 319 340 * @return the square of the euclidean distance from this {@code LatLon} to a specified {@code LatLon} -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r6361 r6500 340 340 } 341 341 342 p rivatestatic LatLon parseLatLon(final String coord) {342 public static LatLon parseLatLon(final String coord) { 343 343 final Matcher m = p.matcher(coord); 344 344 … … 423 423 } 424 424 425 p rivatestatic EastNorth parseEastNorth(String s) {425 public static EastNorth parseEastNorth(String s) { 426 426 String[] en = s.split("[;, ]+"); 427 427 if (en.length != 2) return null;
Note:
See TracChangeset
for help on using the changeset viewer.