Package ucar.nc2.dt.ugrid.geom
Class LatLonPoint2D.Float
java.lang.Object
java.awt.geom.Point2D
ucar.nc2.dt.ugrid.geom.LatLonPoint2D
ucar.nc2.dt.ugrid.geom.LatLonPoint2D.Float
- All Implemented Interfaces:
Serializable,Cloneable
- Enclosing class:
- LatLonPoint2D
The Float version of a LatLonPoint2D, where coordinates are held to float precision.
- 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 floatprotected floatprotected floatprotected floatFields inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
EQUIVALENT_TOLERANCE -
Constructor Summary
ConstructorsConstructorDescriptionFloat()Default constructor, values set to 0, 0.Float(float lat, float lon) Float(float lat, float lon, boolean isRadian) Create Float version from Point2D object, where the x, y values are expected to be decimal degrees.Float(LatLonPoint2D llp) Create Float version from another LatLonPoint2D. -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoublegetX()Point2D method.doublegetY()Point2D methodvoidsetLatitude(double lat) Set latitude.voidsetLatitude(float lat) Set latitude.voidsetLatLon(double lat, double lon) Set lat/lon values.voidsetLatLon(double lat, double lon, boolean isRadians) Set lat/lon values.voidsetLatLon(float lat, float lon) Set lat/lon values.voidsetLatLon(float lat, float lon, boolean isRadians) Set lat/lon values.voidsetLocation(double x, double y) Point2D method, inheriting signature!!voidsetLocation(float x, float y) Point2D method, inheriting signature!!voidsetLongitude(double lon) Set longitude.voidsetLongitude(float 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 float lat -
lon
protected float lon -
radLat
protected transient float radLat -
radLon
protected transient float radLon
-
-
Constructor Details
-
Float
public Float()Default constructor, values set to 0, 0. -
Float
public Float(float lat, float lon) - Parameters:
lat- decimal degree latitude.lon- decimal degree longitude.
-
Float
public Float(float lat, float lon, boolean isRadian) - Parameters:
lat- latitudelon- longitudeisRadian- true if values are radians, false if decimal degrees.
-
Float
Create Float version from another LatLonPoint2D.- Parameters:
llp-
-
Float
Create Float version from Point2D object, where the x, y values are expected to be decimal degrees.- Parameters:
pt2D-
-
-
Method Details
-
setLocation
public void setLocation(float x, float y) Point2D method, inheriting signature!!- Parameters:
x- longitude value in decimal degrees.y- latitude value in decimal degrees.
-
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(float lat, float lon) Set lat/lon values.- Parameters:
lat- decimal degree latitude.lon- decimal degree longitude.
-
setLatLon
public void setLatLon(double lat, double lon) Set lat/lon values.- Specified by:
setLatLonin classLatLonPoint2D- Parameters:
lat- decimal degree latitude.lon- decimal degree longitude.
-
setLatLon
public void setLatLon(double lat, double lon, boolean isRadians) Set lat/lon values.- Specified by:
setLatLonin classLatLonPoint2D- Parameters:
lat- latitude.lon- longitude.isRadians- true if values are radians.
-
setLatLon
public void setLatLon(float lat, float lon, boolean isRadians) Set lat/lon values.- Parameters:
lat- latitude.lon- longitude.isRadians- true if values are radians.
-
getX
public double getX()Point2D method. -
getY
public double getY()Point2D method -
getLongitude
public double getLongitude()- Specified by:
getLongitudein classLatLonPoint2D- Returns:
- decimal degree longitude.
-
getLatitude
public double getLatitude()- Specified by:
getLatitudein classLatLonPoint2D- Returns:
- decimal degree latitude.
-
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(float lat) Set latitude.- Parameters:
lat- latitude in decimal degrees
-
setLatitude
public void setLatitude(double lat) Set latitude.- Specified by:
setLatitudein classLatLonPoint2D- Parameters:
lat- latitude in decimal degrees
-
setLongitude
public void setLongitude(float lon) Set longitude.- Parameters:
lon- longitude in decimal degrees
-
setLongitude
public void setLongitude(double lon) Set longitude.- Specified by:
setLongitudein classLatLonPoint2D- Parameters:
lon- longitude in decimal degrees
-
toString
-