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
public static class LatLonPoint2D.Float extends LatLonPoint2D
The Float version of a LatLonPoint2D, where coordinates are held to float precision.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
LatLonPoint2D.Double, LatLonPoint2D.Float
-
-
Field Summary
Fields Modifier and Type Field Description protected floatlatprotected floatlonprotected floatradLatprotected floatradLon-
Fields inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
EQUIVALENT_TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description Float()Default constructor, values set to 0, 0.Float(float lat, float lon)Float(float lat, float lon, boolean isRadian)Float(Point2D pt2D)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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetLatitude()doublegetLongitude()doublegetRadLat()doublegetRadLon()doublegetX()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.StringtoString()-
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, setLatLon
-
Methods inherited from class java.awt.geom.Point2D
clone, distance, distanceSq, hashCode, setLocation
-
-
-
-
Constructor Detail
-
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
public Float(LatLonPoint2D llp)
Create Float version from another LatLonPoint2D.- Parameters:
llp-
-
Float
public Float(Point2D pt2D)
Create Float version from Point2D object, where the x, y values are expected to be decimal degrees.- Parameters:
pt2D-
-
-
Method Detail
-
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.- Specified by:
getXin classPoint2D- Returns:
- decimal degree longitude.
- See Also:
Point2D.getX()
-
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
-
-