source: josm/src/org/openstreetmap/josm/data/GeoPoint.java@ 2

Last change on this file since 2 was 1, checked in by imi, 19 years ago

wiki 19:37, 27. Sep 2005

File size: 975 bytes
Line 
1package org.openstreetmap.josm.data;
2
3/**
4 * An point holding latitude/longitude and their corresponding north/east values,
5 * which may not be initialized.
6 *
7 * if x or y is "NaN", these are not initialized yet.
8 *
9 * @author imi
10 */
11public class GeoPoint implements Cloneable {
12
13 /**
14 * Latitude/Longitude coordinates.
15 */
16 public double lat = Double.NaN, lon = Double.NaN;
17
18 /**
19 * East/North coordinates;
20 */
21 public double x = Double.NaN, y = Double.NaN;
22
23 /**
24 * Construct the point with latitude / longitude values.
25 * The x/y values are left uninitialized.
26 *
27 * @param lat Latitude of the point.
28 * @param lon Longitude of the point.
29 */
30 public GeoPoint(double lat, double lon) {
31 this.lat = lat;
32 this.lon = lon;
33 }
34
35 /**
36 * Construct the point with all values unset (set to NaN)
37 */
38 public GeoPoint() {
39 }
40
41 @Override
42 public GeoPoint clone() {
43 try {return (GeoPoint)super.clone();} catch (CloneNotSupportedException e) {}
44 return null;
45 }
46}
Note: See TracBrowser for help on using the repository browser.