ucar.unidata.data
Class GeoLocationInfo

java.lang.Object
  extended by ucar.unidata.data.GeoLocationInfo

public class GeoLocationInfo
extends Object

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
GeoLocationInfo()
          Parameterless constructor for xml encoding.
GeoLocationInfo(double maxLat, double minLon, double minLat, double maxLon)
          Create a new GeoLocation
GeoLocationInfo(GeoLocationInfo that)
          copy ctor
GeoLocationInfo(ucar.unidata.geoloc.LatLonRect llr)
          ctor
GeoLocationInfo(Rectangle2D.Float rect)
           
 
Method Summary
 boolean equals(Object obj)
          equals
 double getDegreesX()
          Get the number of degrees from one side to the other in the X direction
 double getDegreesY()
          Get the number of degrees from one side to the other in the Y direction
 ucar.unidata.geoloc.LatLonRect getLatLonRect()
          Create a LatLonRect from me
 ucar.unidata.geoloc.LatLonPoint getLowerRight()
          Get lower right point
 double getMaxLat()
          Get the MaxLat property.
 double getMaxLon()
          Get the MaxLon property.
 double getMinLat()
          Get the MinLat property.
 double getMinLon()
          Get the MinLon property.
 ucar.unidata.geoloc.LatLonPoint getUpperLeft()
          Get the upper left point
 void 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 snapToGrid()
          Snap corners to grid
 String toString()
          Return a String representation of this
 GeoLocationInfo union(GeoLocationInfo that)
          Union with the other geolocationinfo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoLocationInfo

public GeoLocationInfo()
Parameterless constructor for xml encoding.


GeoLocationInfo

public GeoLocationInfo(GeoLocationInfo that)
copy ctor

Parameters:
that - copy from

GeoLocationInfo

public GeoLocationInfo(Rectangle2D.Float rect)

GeoLocationInfo

public GeoLocationInfo(double maxLat,
                       double minLon,
                       double minLat,
                       double maxLon)
Create a new GeoLocation

Parameters:
maxLat - The latitude of the upper left
minLon - The longitude of the upper left
minLat - The latitude of the lower
maxLon - The longitude of the lower right

GeoLocationInfo

public GeoLocationInfo(ucar.unidata.geoloc.LatLonRect llr)
ctor

Parameters:
llr - The latlonrect to create me from
Method Detail

union

public GeoLocationInfo union(GeoLocationInfo that)
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

public void rectify(GeoLocationInfo that,
                    double minResolution)
Make sure wew are within the that with the given resolution.

Parameters:
that - bounds to be within
minResolution - 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

public String toString()
Return a String representation of this

Overrides:
toString in class Object
Returns:
string representation

equals

public boolean equals(Object obj)
equals

Overrides:
equals in class Object
Parameters:
obj - obj
Returns:
is equals