Package uk.ac.rdg.resc.edal.position
Class HorizontalPosition
- java.lang.Object
-
- uk.ac.rdg.resc.edal.position.HorizontalPosition
-
- All Implemented Interfaces:
Serializable
public class HorizontalPosition extends Object implements Serializable
Defines the position of a point in the horizontal plane.- Author:
- Jon Blower, Guy
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HorizontalPosition(double longitude, double latitude)
Constructs aHorizontalPosition
which usesDefaultGeographicCRS#WGS84
as its co-ordinate reference systemHorizontalPosition(double x, double y, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Construct aHorizontalPosition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
org.opengis.referencing.crs.CoordinateReferenceSystem
getCoordinateReferenceSystem()
Returns a two-dimensional coordinate reference system.double
getX()
Returns the x coordinate of this positiondouble
getY()
Returns the y coordinate of this positionint
hashCode()
String
toString()
-
-
-
Constructor Detail
-
HorizontalPosition
public HorizontalPosition(double longitude, double latitude)
Constructs aHorizontalPosition
which usesDefaultGeographicCRS#WGS84
as its co-ordinate reference system- Parameters:
longitude
- The longitude of the positionlatitude
- The latitude of the position
-
HorizontalPosition
public HorizontalPosition(double x, double y, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Construct aHorizontalPosition
- Parameters:
x
- The x-value of the positiony
- The y-value of the positioncrs
- TheCoordinateReferenceSystem
used to reference the x/y values
-
-
Method Detail
-
getX
public double getX()
Returns the x coordinate of this position
-
getY
public double getY()
Returns the y coordinate of this position
-
getCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Returns a two-dimensional coordinate reference system. The first coordinate in the CRS is thex coordinate
; the second is they coordinate
.- Returns:
- a two-dimensional coordinate reference system
-
-