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 aHorizontalPositionwhich usesDefaultGeographicCRS#WGS84as 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 booleanequals(Object obj)org.opengis.referencing.crs.CoordinateReferenceSystemgetCoordinateReferenceSystem()Returns a two-dimensional coordinate reference system.doublegetX()Returns the x coordinate of this positiondoublegetY()Returns the y coordinate of this positioninthashCode()StringtoString()
-
-
-
Constructor Detail
-
HorizontalPosition
public HorizontalPosition(double longitude, double latitude)Constructs aHorizontalPositionwhich usesDefaultGeographicCRS#WGS84as 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- TheCoordinateReferenceSystemused 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
-
-