Package org.geolatte.geom
Class G2D
- java.lang.Object
-
- org.geolatte.geom.Position
-
- org.geolatte.geom.G2D
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCoordinateDimension()doublegetLat()Returns the latitude of this positiondoublegetLon()Returns the longitude of this position-
Methods inherited from class org.geolatte.geom.Position
equals, getCoordinate, getCoordinate, getCoordinate, hashCode, isEmpty, toArray, toString
-
-
-
-
Constructor Detail
-
G2D
public G2D()
Constructs an empty instance
-
G2D
public G2D(double lon, double lat)Constructs an instance with the specified longitude and latitude- Parameters:
lon- the longitudelat- the latitude
-
G2D
protected G2D(double... coords)
Constructs an instance from the specified coordinates. It expects first the longitude, then the latitude coordinate- Parameters:
coords-
-
-
Method Detail
-
getLon
public double getLon()
Returns the longitude of this position- Returns:
- the longitude of this position
-
getLat
public double getLat()
Returns the latitude of this position- Returns:
- the latitude of this position
-
getCoordinateDimension
public int getCoordinateDimension()
- Specified by:
getCoordinateDimensionin classPosition
-
-