Package ucar.unidata.data
Class GeoLocationInfo
java.lang.Object
ucar.unidata.data.GeoLocationInfo
Holds geo-location information - lat/lon bounding box, image size, etc.
This is used to pass information from a chooser into a datasource.
-
Constructor Summary
ConstructorsConstructorDescriptionParameterless constructor for xml encoding.GeoLocationInfo
(double maxLat, double minLon, double minLat, double maxLon) Create a new GeoLocationGeoLocationInfo
(Rectangle2D rect) copy ctorGeoLocationInfo
(ucar.unidata.geoloc.LatLonRect llr) ctor -
Method Summary
Modifier and TypeMethodDescriptionboolean
equalsdouble
Get the number of degrees from one side to the other in the X directiondouble
Get the number of degrees from one side to the other in the Y directionucar.unidata.geoloc.LatLonRect
Create a LatLonRect from meucar.unidata.geoloc.LatLonPoint
Get lower right pointdouble
Get the MaxLat property.double
Get the MaxLon property.double
Get the MinLat property.double
Get the MinLon property.ucar.unidata.geoloc.LatLonPoint
Get the upper left pointvoid
rectify
(GeoLocationInfo that, double minResolution) Make sure wew are within the that with the given resolution.void
setMaxLat
(double value) Set the MaxLat property.void
setMaxLon
(double value) Set the MaxLon property.void
setMinLat
(double value) Set the MinLat property.void
setMinLon
(double value) Set the MinLon property.void
Snap corners to gridtoString()
Return a String representation of thisunion
(GeoLocationInfo that) Union with the other geolocationinfo
-
Constructor Details
-
GeoLocationInfo
public GeoLocationInfo()Parameterless constructor for xml encoding. -
GeoLocationInfo
copy ctor- Parameters:
that
- copy from
-
GeoLocationInfo
-
GeoLocationInfo
public GeoLocationInfo(double maxLat, double minLon, double minLat, double maxLon) Create a new GeoLocation- Parameters:
maxLat
- The latitude of the upper leftminLon
- The longitude of the upper leftminLat
- The latitude of the lowermaxLon
- The longitude of the lower right
-
GeoLocationInfo
public GeoLocationInfo(ucar.unidata.geoloc.LatLonRect llr) ctor- Parameters:
llr
- The latlonrect to create me from
-
-
Method Details
-
union
Union with the other geolocationinfo- Parameters:
that
- object to union with- Returns:
- The union.
-
getLatLonRect
public ucar.unidata.geoloc.LatLonRect getLatLonRect()Create a LatLonRect from me- Returns:
- The latlonrect
-
getUpperLeft
public ucar.unidata.geoloc.LatLonPoint getUpperLeft()Get the upper left point- Returns:
- Upper left point
-
getLowerRight
public ucar.unidata.geoloc.LatLonPoint getLowerRight()Get lower right point- Returns:
- lower right point
-
snapToGrid
public void snapToGrid()Snap corners to grid -
rectify
Make sure wew are within the that with the given resolution.- Parameters:
that
- bounds to be withinminResolution
- min size
-
getDegreesX
public double getDegreesX()Get the number of degrees from one side to the other in the X direction- Returns:
- number of degrees
-
getDegreesY
public double getDegreesY()Get the number of degrees from one side to the other in the Y direction- Returns:
- number of degrees
-
setMaxLat
public void setMaxLat(double value) Set the MaxLat property.- Parameters:
value
- The new value for MaxLat
-
getMaxLat
public double getMaxLat()Get the MaxLat property.- Returns:
- The MaxLat
-
setMinLon
public void setMinLon(double value) Set the MinLon property.- Parameters:
value
- The new value for MinLon
-
getMinLon
public double getMinLon()Get the MinLon property.- Returns:
- The MinLon
-
setMinLat
public void setMinLat(double value) Set the MinLat property.- Parameters:
value
- The new value for MinLat
-
getMinLat
public double getMinLat()Get the MinLat property.- Returns:
- The MinLat
-
setMaxLon
public void setMaxLon(double value) Set the MaxLon property.- Parameters:
value
- The new value for MaxLon
-
getMaxLon
public double getMaxLon()Get the MaxLon property.- Returns:
- The MaxLon
-
toString
Return a String representation of this -
equals
equals
-