it.cutruzzula.lgml.geometry
Class Polygon

java.lang.Object
  extended by it.cutruzzula.lgml.geometry.AbstractGeometry
      extended by it.cutruzzula.lgml.geometry.Polygon

public class Polygon
extends AbstractGeometry

The class represents a POLYGON object.


Constructor Summary
Polygon(java.util.List<LinearRing> linearRings, int srsDimension)
          Constructor.
 
Method Summary
 java.lang.String asWKT()
          Method to get the WKT form of this polygon object.
 java.util.List<LinearRing> getLinearRings()
          Method to get the list of linear-rings.
 java.lang.String getType()
          Method to get the geometry type.
 
Methods inherited from class it.cutruzzula.lgml.geometry.AbstractGeometry
getSrsDimension, getSrsName, setSrsName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(java.util.List<LinearRing> linearRings,
               int srsDimension)
        throws java.lang.Exception
Constructor.

Parameters:
linearRings - A java.util.List of LinearRing objects
srsDimension - The number of dimensions
Throws:
A - generic exception if dimensions are not homogeneous
java.lang.Exception
Method Detail

getLinearRings

public java.util.List<LinearRing> getLinearRings()
Method to get the list of linear-rings.

Returns:
A java.util.List of LinearRing objects

asWKT

public java.lang.String asWKT()
Method to get the WKT form of this polygon object.

Specified by:
asWKT in class AbstractGeometry
Returns:
The WKT string

getType

public java.lang.String getType()
Method to get the geometry type.

Specified by:
getType in class AbstractGeometry
Returns:
"POLYGON" constant