Class Subregion

java.lang.Object
noaa.coastwatch.render.Subregion

public class Subregion extends Object
  • Constructor Details

    • Subregion

      public Subregion(EarthLocation centerLoc, double radius, String name, String shortName)
      Creates a new subregion.
      Parameters:
      centerLoc - the subregion center location.
      radius - the subregino radius in kilometers.
      name - the common subregion name, for example "Chesapeake Bay".
      shortName - an abbreviated subregion name for use in software, for example "cb".
    • Subregion

      public Subregion(EarthLocation centerLoc, double radius)
      Creates a new subregion with empty name and short name.
      Parameters:
      centerLoc - the subregion center location.
      radius - the subregino radius in kilometers.
  • Method Details

    • getLimits

      public boolean getLimits(EarthTransform trans, DataLocation start, DataLocation end)
      Gets the data location limits of this subregion relative to the specified earth transform.
      Parameters:
      trans - the earth transform to use for computations.
      start - the starting data location for the rectangle that minimally encloses this subregion (modified).
      end - the ending data location for the rectangle that minimally encloses this subregion (modified).
      Returns:
      true if the limits were found and set, or false if one of the coordinate transforms returned an invalid earth or data location. Usually this means that the limits are past the edge of some transform discontinuity.
    • getCenter

      public EarthLocation getCenter()
      Gets this subregion center location.
    • getRadius

      public double getRadius()
      Gets this subregion radius in kilometers.
    • getName

      public String getName()
      Gets this subregion name.
    • getShortName

      public String getShortName()
      Gets this subregion short name.
    • toString

      public String toString()
      Returns a string version of this subregion (the long name).
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Returns true if the subregions are equal.
      Overrides:
      equals in class Object