com.isti.util.gis
Class IstiRegion.Polygon

java.lang.Object
  extended by com.isti.util.gis.IstiRegion
      extended by com.isti.util.gis.IstiRegion.Polygon
Enclosing class:
IstiRegion

public static class IstiRegion.Polygon
extends IstiRegion

Polygon region.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.isti.util.gis.IstiRegion
IstiRegion.Circle, IstiRegion.LatLonPoint, IstiRegion.LatLonPolygon, IstiRegion.Polygon
 
Field Summary
 
Fields inherited from class com.isti.util.gis.IstiRegion
ageValidator, COORD_BEGIN_CHAR, COORD_END_CHAR, COORD_SEP_CHAR, DEF_SPECIAL_CHARS_STR, defaultConversionFactor, depthValidator, GLOBAL_ALARM_OPTION_GROUP, magValidator, NAME_BEGIN_CHAR, NAME_END_CHAR, OPID_AUDIBLE, OPID_MAG, OPID_MAXAGE, OPID_MAXDEPTH, OPID_MINDEPTH, OPID_NAME, OPID_VERIFIED, OPID_VISUAL, OPTION_BEGIN_CHAR, OPTION_END_CHAR, REGION_SEP_CHAR, regionTextValueStr
 
Constructor Summary
  IstiRegion.Polygon(double[] llPoints)
          Creates a region defined by the specified coordinates.
protected IstiRegion.Polygon(IstiRegion.Polygon poly)
          Creates a region defined by the specified coordinates.
protected IstiRegion.Polygon(java.lang.String str)
          Constructs a region.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of a region.
 boolean contains(double lat, double lon)
          Determines if the specified point is inside of the region.
 double[] getLatLonPoints()
          Gets the lat/lon points.
 
Methods inherited from class com.isti.util.gis.IstiRegion
circleToString, coordsToString, coordToString, copyOptions, createOptionsComponentPanel, extractRegionName, floatNumberToString, getDefaultOptions, getName, getOption, getOptionNumberValue, getOptionStringValue, getOptionValue, getRegionTextValueStr, insertQuoteChars, parse, parse, parseOptions, parseRegions, radiusToString, removeQuoteChars, replaceRegionName, setOptionValue, stringToCoord, stringToCoords, stringToRadius, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IstiRegion.Polygon

public IstiRegion.Polygon(double[] llPoints)
Creates a region defined by the specified coordinates.

Parameters:
llPoints - the coordinates, in the format [lat0, lon0, lat1, lon1, ... ].

IstiRegion.Polygon

protected IstiRegion.Polygon(IstiRegion.Polygon poly)
Creates a region defined by the specified coordinates.

Parameters:
poly - the polygon to copy.

IstiRegion.Polygon

protected IstiRegion.Polygon(java.lang.String str)
                      throws java.lang.InstantiationException
Constructs a region.

Parameters:
str - string representation of the region.
Throws:
java.lang.InstantiationException - if the class cannot be instantiated.
Method Detail

clone

public java.lang.Object clone()
Creates a copy of a region.

Overrides:
clone in class IstiRegion
Returns:
a copy of the region.

contains

public boolean contains(double lat,
                        double lon)
Determines if the specified point is inside of the region.

Overrides:
contains in class IstiRegion
Parameters:
lat - the latitude of the point.
lon - the longitude of the point.
Returns:
true if the point is inside the region, false otherwise.

getLatLonPoints

public double[] getLatLonPoints()
Gets the lat/lon points.

Returns:
the lat/lon points.