Package ucar.unidata.data
Class GeoSelection
java.lang.Object
ucar.unidata.data.GeoSelection
Holds geo-location information - lat/lon bounding box, image size, etc.
This is used to pass information from a chooser into a datasource.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNo stride valuestatic final intNo stride value -
Constructor Summary
ConstructorsConstructorDescriptionctorGeoSelection(GeoLocationInfo boundingBox) ctorGeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level) ctor.GeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level, Rectangle2D screenBoundRect) Construct a GeoSelectionGeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level, Rectangle2D screenBoundRect, boolean useViewBounds) Construct a GeoSelectionGeoSelection(GeoLocationInfo boundingBox, int stride) ctorGeoSelection(GeoLocationInfo boundingBox, int xStride, int yStride, int zStride) ctor.GeoSelection(GeoLocationInfo boundingBox, int xStride, int yStride, int zStride, Real level) ctor.GeoSelection(GeoSelection that) Copy ctorGeoSelection(Real level) ctor -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the stride settingsbooleanequalsGet the BoundingBox property.static GeoLocationInfoGet the default bboxbooleanDoes this selection have any stride other than NONE and BASEbooleanDo we have either a bounding box or any valid stridesucar.unidata.geoloc.LatLonRectUtility to get a lat lon rect if we have one.getLevel()Get the Level property._more_booleanGet the UseFullBounds property.booleanGet the UseViewBounds property.intGet the XStride property.intGet the XStride property if it is valid.intGet the YStride property.intGet the YStride property if it is valid.intGet the ZStride property.intGet the ZStride property if it is valid.inthashCode()hash mebooleanIs there a spatial subset definedbooleanDo we have any stride definedbooleanDo we have a stride definedbooleanDo we have a stride definedbooleanDo we have a stride definedstatic GeoSelectionmerge(GeoSelection highPriority, GeoSelection lowPriority) Create a new GeoSelection by merging the two subsets.voidsetBoundingBox(GeoLocationInfo value) Set the BoundingBox property.static voidsetDefaultBoundingBox(GeoLocationInfo defaultBox) Define the global bounding box that is used as the defaultvoidsetLatLonRect(Rectangle2D rect) Set the bounds using the rectanglevoidSet the Level property.voidsetScreenBound(Rectangle2D screenBoundRect) _more_voidsetStride(int value) Set the Stride property.voidsetUseFullBounds(boolean value) Set the UseFullBounds property.voidsetUseViewBounds(boolean value) Set the UseViewBounds property.voidsetXStride(int value) Set the XStride property.voidsetYStride(int value) Set the YStride property.voidsetZStride(int value) Set the ZStride property.toString()tostring
-
Field Details
-
STRIDE_NONE
public static final int STRIDE_NONENo stride value- See Also:
-
STRIDE_BASE
public static final int STRIDE_BASENo stride value- See Also:
-
-
Constructor Details
-
GeoSelection
public GeoSelection()ctor -
GeoSelection
ctor- Parameters:
level- The level to use
-
GeoSelection
Copy ctor- Parameters:
that- The object to copy
-
GeoSelection
ctor- Parameters:
boundingBox- The bounding box. May be null.
-
GeoSelection
ctor- Parameters:
boundingBox- The bounding box. May be null.stride- The stride for x, y and z
-
GeoSelection
ctor.- Parameters:
boundingBox- The bounding box. May be null.xStride- X strideyStride- Y stridezStride- Z stride
-
GeoSelection
ctor.- Parameters:
boundingBox- The bounding box. May be null.xStride- X strideyStride- Y stridezStride- Z stridelevel- The level to use
-
GeoSelection
public GeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level) ctor.- Parameters:
boundingBox- The bounding box. May be null.useFullBounds- Use full boundsxStride- X strideyStride- Y stridezStride- Z stridelevel- The level to use
-
GeoSelection
public GeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level, Rectangle2D screenBoundRect) Construct a GeoSelection- Parameters:
boundingBox- _more_useFullBounds- _more_xStride- _more_yStride- _more_zStride- _more_level- _more_screenBoundRect- _more_
-
GeoSelection
public GeoSelection(GeoLocationInfo boundingBox, boolean useFullBounds, int xStride, int yStride, int zStride, Real level, Rectangle2D screenBoundRect, boolean useViewBounds) Construct a GeoSelection- Parameters:
boundingBox- _more_useFullBounds- _more_xStride- _more_yStride- _more_zStride- _more_level- _more_screenBoundRect- _more_useViewBounds- _more_
-
-
Method Details
-
getDefaultBoundingBox
Get the default bbox- Returns:
- default bbox
-
setDefaultBoundingBox
Define the global bounding box that is used as the default- Parameters:
defaultBox- default box
-
setLatLonRect
Set the bounds using the rectangle- Parameters:
rect- rect
-
getLatLonRect
public ucar.unidata.geoloc.LatLonRect getLatLonRect()Utility to get a lat lon rect if we have one.- Returns:
- latlon rectangle
-
getHasValidState
public boolean getHasValidState()Do we have either a bounding box or any valid strides- Returns:
- Has anything to subset
-
hasSpatialSubset
public boolean hasSpatialSubset()Is there a spatial subset defined- Returns:
- Has spatial subset
-
getHasNonOneStride
public boolean getHasNonOneStride()Does this selection have any stride other than NONE and BASE- Returns:
- has a stride defined other than NONE or BASE
-
merge
Create a new GeoSelection by merging the two subsets.- Parameters:
highPriority- Take state from this first if definedlowPriority- Use this state- Returns:
- The merged subset
-
setStride
public void setStride(int value) Set the Stride property.- Parameters:
value- The new value for Stride
-
clearStride
public void clearStride()Clear the stride settings -
hasXStride
public boolean hasXStride()Do we have a stride defined- Returns:
- x stride defined
-
hasYStride
public boolean hasYStride()Do we have a stride defined- Returns:
- y stride defined
-
hasZStride
public boolean hasZStride()Do we have a stride defined- Returns:
- z stride defined
-
hasStride
public boolean hasStride()Do we have any stride defined- Returns:
- any stride defined
-
setXStride
public void setXStride(int value) Set the XStride property.- Parameters:
value- The new value for XStride
-
getXStride
public int getXStride()Get the XStride property.- Returns:
- The XStride
-
getXStrideToUse
public int getXStrideToUse()Get the XStride property if it is valid. Else return the base stride.- Returns:
- The x stride to use
-
setYStride
public void setYStride(int value) Set the YStride property.- Parameters:
value- The new value for YStride
-
getYStride
public int getYStride()Get the YStride property.- Returns:
- The YStride
-
getYStrideToUse
public int getYStrideToUse()Get the YStride property if it is valid. Else return the base stride.- Returns:
- The y stride to use
-
setZStride
public void setZStride(int value) Set the ZStride property.- Parameters:
value- The new value for ZStride
-
getZStride
public int getZStride()Get the ZStride property.- Returns:
- The ZStride
-
getZStrideToUse
public int getZStrideToUse()Get the ZStride property if it is valid. Else return the base stride.- Returns:
- The z stride to use
-
setBoundingBox
Set the BoundingBox property.- Parameters:
value- The new value for BoundingBox
-
getBoundingBox
Get the BoundingBox property.- Returns:
- The BoundingBox
-
toString
tostring -
setLevel
Set the Level property.- Parameters:
value- The new value for Level
-
getLevel
Get the Level property.- Returns:
- The Level
-
hashCode
public int hashCode()hash me -
equals
equals -
setUseFullBounds
public void setUseFullBounds(boolean value) Set the UseFullBounds property.- Parameters:
value- The new value for UseFullBounds
-
getUseFullBounds
public boolean getUseFullBounds()Get the UseFullBounds property.- Returns:
- The UseFullBounds
-
setUseViewBounds
public void setUseViewBounds(boolean value) Set the UseViewBounds property.- Parameters:
value- The new value for UseViewBounds
-
getUseViewBounds
public boolean getUseViewBounds()Get the UseViewBounds property.- Returns:
- The UseViewBounds
-
setScreenBound
_more_- Parameters:
screenBoundRect- _more_
-
getScreenBound
_more_- Returns:
- _more_
-