org.geotools.gml
Class SubHandlerPolygon

java.lang.Object
  extended by org.geotools.gml.SubHandler
      extended by org.geotools.gml.SubHandlerPolygon

public class SubHandlerPolygon
extends SubHandler

Creates a Polygon geometry.

Version:
$Id: SubHandlerPolygon.java 30648 2008-06-12 19:22:35Z acuster $
Author:
Ian Turton, CCG, Rob Hranac, Vision for New York

Field Summary
protected static com.vividsolutions.jts.algorithm.CGAlgorithms cga
           
 
Fields inherited from class org.geotools.gml.SubHandler
GEOMETRY_END, GEOMETRY_START, GEOMETRY_SUB
 
Constructor Summary
SubHandlerPolygon()
          Creates a new instance of GMLPolygonHandler.
 
Method Summary
 void addCoordinate(com.vividsolutions.jts.geom.Coordinate coordinate)
          Adds a coordinate to the current LinearRing.
 com.vividsolutions.jts.geom.Geometry create(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
          Returns the completed OGC Polygon.
 boolean isComplete(java.lang.String message)
          Determines whether or not the geometry is ready to be returned.
 void subGeometry(java.lang.String message, int type)
          Catches inner and outer LinearRings messages and handles them appropriately.
 
Methods inherited from class org.geotools.gml.SubHandler
getSRID, getSRS, setSRS, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cga

protected static com.vividsolutions.jts.algorithm.CGAlgorithms cga
Constructor Detail

SubHandlerPolygon

public SubHandlerPolygon()
Creates a new instance of GMLPolygonHandler.

Method Detail

subGeometry

public void subGeometry(java.lang.String message,
                        int type)
Catches inner and outer LinearRings messages and handles them appropriately.

Overrides:
subGeometry in class SubHandler
Parameters:
message - Name of sub geometry located.
type - Type of sub geometry located.

addCoordinate

public void addCoordinate(com.vividsolutions.jts.geom.Coordinate coordinate)
Adds a coordinate to the current LinearRing.

Specified by:
addCoordinate in class SubHandler
Parameters:
coordinate - Name of sub geometry located.

isComplete

public boolean isComplete(java.lang.String message)
Determines whether or not the geometry is ready to be returned.

Specified by:
isComplete in class SubHandler
Parameters:
message - Name of GML element that prompted this check.
Returns:
Flag indicating whether or not the geometry is ready to be returned.

create

public com.vividsolutions.jts.geom.Geometry create(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
Returns the completed OGC Polygon.

Specified by:
create in class SubHandler
Parameters:
geometryFactory - Geometry factory to be used in Polygon creation.
Returns:
Completed OGC Polygon.


Copyright © 1996-2010 Geotools. All Rights Reserved.