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
public static class LatLonPoint2D.Double extends LatLonPoint2D
Double precision version of LatLonPoint2D.- 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 doublelatprotected doublelonprotected doubleradLatprotected doubleradLon-
Fields inherited from class ucar.nc2.dt.ugrid.geom.LatLonPoint2D
EQUIVALENT_TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description Double()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.Double(Point2D pt2D)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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetLatitude()doublegetLongitude()doublegetRadLat()doublegetRadLon()doublegetX()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.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
-
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
public Double(LatLonPoint2D llp)
Create Double version from another LatLonPoint2D.- Parameters:
llp-
-
Double
public Double(Point2D pt2D)
Create Double version from Point2D object, where the x, y values are expected to be decimal degrees.- Parameters:
pt2D-
-
-
Method Detail
-
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()
-
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
-
-