public class Subregion
extends java.lang.Object
Constructor and Description |
---|
Subregion(EarthLocation centerLoc,
double radius)
Creates a new subregion with empty name and short name.
|
Subregion(EarthLocation centerLoc,
double radius,
java.lang.String name,
java.lang.String shortName)
Creates a new subregion.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the subregions are equal.
|
EarthLocation |
getCenter()
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.
|
java.lang.String |
getName()
Gets this subregion name.
|
double |
getRadius()
Gets this subregion radius in kilometers.
|
java.lang.String |
getShortName()
Gets this subregion short name.
|
java.lang.String |
toString()
Returns a string version of this subregion (the long name).
|
public Subregion(EarthLocation centerLoc, double radius, java.lang.String name, java.lang.String shortName)
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".public Subregion(EarthLocation centerLoc, double radius)
centerLoc
- the subregion center location.radius
- the subregino radius in kilometers.public boolean getLimits(EarthTransform trans, DataLocation start, DataLocation end)
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).public EarthLocation getCenter()
public double getRadius()
public java.lang.String getName()
public java.lang.String getShortName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object