Package ucar.nc2.dt.ugrid.geom
Class LatLonPoint2D.Double
java.lang.Object
java.awt.geom.Point2D
ucar.nc2.dt.ugrid.geom.LatLonPoint2D
ucar.nc2.dt.ugrid.geom.LatLonPoint2D.Double
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
LatLonPoint3D
- Enclosing class:
- LatLonPoint2D
Double precision version of LatLonPoint2D.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
LatLonPoint2D.Double, LatLonPoint2D.Float -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected doubleprotected doubleFields inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
EQUIVALENT_TOLERANCE -
Constructor Summary
ConstructorsConstructorDescriptionDouble()Default constructor, values set to 0, 0.Double(double lat, double lon) Set the latitude, longitude for this point in decimal degrees.Double(double lat, double lon, boolean isRadian) Set the latitude, longitude for this point, with the option of noting whether the values are in degrees or radians.Create Double version from Point2D object, where the x, y values are expected to be decimal degrees.Double(LatLonPoint2D llp) Create Double version from another LatLonPoint2D. -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoublegetX()doublegetY()voidsetLatitude(double lat) Set latitude.voidsetLatLon(double lat, double lon) Set latitude and longitude.voidsetLatLon(double lat, double lon, boolean isRadians) Set latitude and longitude.voidsetLocation(double x, double y) Point2D method, inheriting signature!!voidsetLongitude(double lon) Set longitude.toString()Methods inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
calculateGeographicCenter, distance, distance, distanceSq, distanceSq, equals, getDouble, getFloat, isInvalidLatitude, isInvalidLongitude, normLat, normLon, normLon, normLon360, range180, setLatLonMethods inherited from class java.awt.geom.Point2D
clone, distance, distanceSq, hashCode, setLocation
-
Field Details
-
lat
protected double lat -
lon
protected double lon -
radLat
protected transient double radLat -
radLon
protected transient double radLon
-
-
Constructor Details
-
Double
public Double()Default constructor, values set to 0, 0. -
Double
public Double(double lat, double lon) Set the latitude, longitude for this point in decimal degrees.- Parameters:
lat- latitudelon- longitude.
-
Double
public Double(double lat, double lon, boolean isRadian) Set the latitude, longitude for this point, with the option of noting whether the values are in degrees or radians.- Parameters:
lat- latitudelon- longitude.isRadian- true if in radians, false if in degrees true of values are radians.
-
Double
Create Double version from another LatLonPoint2D.- Parameters:
llp-
-
Double
Create Double version from Point2D object, where the x, y values are expected to be decimal degrees.- Parameters:
pt2D-
-
-
Method Details
-
setLocation
public void setLocation(double x, double y) Point2D method, inheriting signature!!- Specified by:
setLocationin classPoint2D- Parameters:
x- longitude value in decimal degrees.y- latitude value in decimal degrees.
-
setLatLon
public void setLatLon(double lat, double lon) Set latitude and longitude.- Specified by:
setLatLonin classLatLonPoint2D- Parameters:
lat- latitude in decimal degrees.lon- longitude in decimal degrees.
-
setLatLon
public void setLatLon(double lat, double lon, boolean isRadians) Set latitude and longitude.- Specified by:
setLatLonin classLatLonPoint2D- Parameters:
lat- latitude.lon- longitude.isRadians- true if lat/lon values are radians.
-
getX
public double getX() -
getY
public double getY() -
getLatitude
public double getLatitude()- Specified by:
getLatitudein classLatLonPoint2D- Returns:
- float latitude in decimal degrees.
-
getLongitude
public double getLongitude()- Specified by:
getLongitudein classLatLonPoint2D- Returns:
- float longitude in decimal degrees.
-
getRadLon
public double getRadLon()- Specified by:
getRadLonin classLatLonPoint2D- Returns:
- radian longitude.
-
getRadLat
public double getRadLat()- Specified by:
getRadLatin classLatLonPoint2D- Returns:
- radian latitude.
-
setLatitude
public void setLatitude(double lat) Set latitude.- Specified by:
setLatitudein classLatLonPoint2D- Parameters:
lat- latitude in decimal degrees
-
setLongitude
public void setLongitude(double lon) Set longitude.- Specified by:
setLongitudein classLatLonPoint2D- Parameters:
lon- longitude in decimal degrees
-
toString
-