org.gwtopenmaps.openlayers.client.geometry
Class Polygon

java.lang.Object
  extended by org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
      extended by org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
          extended by org.gwtopenmaps.openlayers.client.geometry.Geometry
              extended by org.gwtopenmaps.openlayers.client.geometry.Collection
                  extended by org.gwtopenmaps.openlayers.client.geometry.Polygon

public class Polygon
extends Collection

Author:
Edwin Commandeur - Atlis EJS

Field Summary
 
Fields inherited from class org.gwtopenmaps.openlayers.client.geometry.Geometry
LINEARRING_CLASS_NAME, LINESTRING_CLASS_NAME, MULTI_LINE_STRING_CLASS_NAME, MULTI_POLYGON_CLASS_NAME, POINT_CLASS_NAME, POLYGON_CLASS_NAME
 
Constructor Summary
protected Polygon(JSObject element)
           
  Polygon(LinearRing[] rings)
           
 
Method Summary
 double getArea()
           
 LinearRing[] getComponents()
          Polygons are composed of LinearRing geometries.
 double getGeodesicArea(Projection projection)
           
 boolean intersects(Geometry geometry)
          Determine if the input geometry intersects this one.
static Polygon narrowToPolygon(JSObject polygon)
           
 
Methods inherited from class org.gwtopenmaps.openlayers.client.geometry.Collection
equals, getComponent, getLength, getNumberOfComponents, transform
 
Methods inherited from class org.gwtopenmaps.openlayers.client.geometry.Geometry
calculateBounds, clone, destroy, fromWKT, getBounds, narrowToGeometry, toString
 
Methods inherited from class org.gwtopenmaps.openlayers.client.OpenLayersObjectWrapper
getClassName, getEvents, narrowToOpenLayersObjectWrapper
 
Methods inherited from class org.gwtopenmaps.openlayers.client.util.JSObjectWrapper
getJSObject, setJSObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polygon

protected Polygon(JSObject element)

Polygon

public Polygon(LinearRing[] rings)
Method Detail

narrowToPolygon

public static Polygon narrowToPolygon(JSObject polygon)

getComponents

public LinearRing[] getComponents()
Polygons are composed of LinearRing geometries. LinearRing geometries are MultiPoint geometries, whose components are Points. The first and last component of a LinearRing is the same point, even if a LinearRing is instantiated with an array of Points whose first and last point are not the same.

Returns:
Array of LinearRing Objects

intersects

public boolean intersects(Geometry geometry)
Determine if the input geometry intersects this one.

Parameters:
geometry - Any type of geometry.
Returns:
The input geometry intersects this one.

getArea

public double getArea()
Overrides:
getArea in class Geometry

getGeodesicArea

public double getGeodesicArea(Projection projection)


Copyright © 2011 sourceforge. All Rights Reserved.