Class GeoSelection

java.lang.Object
ucar.unidata.data.GeoSelection

public class GeoSelection 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.
  • Field Details

  • Constructor Details

    • GeoSelection

      public GeoSelection()
      ctor
    • GeoSelection

      public GeoSelection(Real level)
      ctor
      Parameters:
      level - The level to use
    • GeoSelection

      public GeoSelection(GeoSelection that)
      Copy ctor
      Parameters:
      that - The object to copy
    • GeoSelection

      public GeoSelection(GeoLocationInfo boundingBox)
      ctor
      Parameters:
      boundingBox - The bounding box. May be null.
    • GeoSelection

      public GeoSelection(GeoLocationInfo boundingBox, int stride)
      ctor
      Parameters:
      boundingBox - The bounding box. May be null.
      stride - The stride for x, y and z
    • GeoSelection

      public GeoSelection(GeoLocationInfo boundingBox, int xStride, int yStride, int zStride)
      ctor.
      Parameters:
      boundingBox - The bounding box. May be null.
      xStride - X stride
      yStride - Y stride
      zStride - Z stride
    • GeoSelection

      public GeoSelection(GeoLocationInfo boundingBox, int xStride, int yStride, int zStride, Real level)
      ctor.
      Parameters:
      boundingBox - The bounding box. May be null.
      xStride - X stride
      yStride - Y stride
      zStride - Z stride
      level - 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 bounds
      xStride - X stride
      yStride - Y stride
      zStride - Z stride
      level - 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

      public static GeoLocationInfo getDefaultBoundingBox()
      Get the default bbox
      Returns:
      default bbox
    • setDefaultBoundingBox

      public static void setDefaultBoundingBox(GeoLocationInfo defaultBox)
      Define the global bounding box that is used as the default
      Parameters:
      defaultBox - default box
    • setLatLonRect

      public void setLatLonRect(Rectangle2D rect)
      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

      public static GeoSelection merge(GeoSelection highPriority, GeoSelection lowPriority)
      Create a new GeoSelection by merging the two subsets.
      Parameters:
      highPriority - Take state from this first if defined
      lowPriority - 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

      public void setBoundingBox(GeoLocationInfo value)
      Set the BoundingBox property.
      Parameters:
      value - The new value for BoundingBox
    • getBoundingBox

      public GeoLocationInfo getBoundingBox()
      Get the BoundingBox property.
      Returns:
      The BoundingBox
    • toString

      public String toString()
      tostring
      Overrides:
      toString in class Object
      Returns:
      tostring
    • setLevel

      public void setLevel(Real value)
      Set the Level property.
      Parameters:
      value - The new value for Level
    • getLevel

      public Real getLevel()
      Get the Level property.
      Returns:
      The Level
    • hashCode

      public int hashCode()
      hash me
      Overrides:
      hashCode in class Object
      Returns:
      my hash code
    • equals

      public boolean equals(Object obj)
      equals
      Overrides:
      equals in class Object
      Parameters:
      obj - obj
      Returns:
      is 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

      public void setScreenBound(Rectangle2D screenBoundRect)
      _more_
      Parameters:
      screenBoundRect - _more_
    • getScreenBound

      public Rectangle2D getScreenBound()
      _more_
      Returns:
      _more_