Package noaa.coastwatch.render
Class Subregion
java.lang.Object
noaa.coastwatch.render.Subregion
-
Constructor Summary
ConstructorDescriptionSubregion
(EarthLocation centerLoc, double radius) Creates a new subregion with empty name and short name.Subregion
(EarthLocation centerLoc, double radius, String name, String shortName) Creates a new subregion. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the subregions are equal.Gets this subregion center location.boolean
getLimits
(EarthTransform trans, DataLocation start, DataLocation end) Gets the data location limits of this subregion relative to the specified earth transform.getName()
Gets this subregion name.double
Gets this subregion radius in kilometers.Gets this subregion short name.toString()
Returns a string version of this subregion (the long name).
-
Constructor Details
-
Subregion
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
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
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
Gets this subregion center location. -
getRadius
public double getRadius()Gets this subregion radius in kilometers. -
getName
Gets this subregion name. -
getShortName
Gets this subregion short name. -
toString
Returns a string version of this subregion (the long name). -
equals
Returns true if the subregions are equal.
-