Class SubHandlerPolygon


  • public class SubHandlerPolygon
    extends SubHandler
    Creates a Polygon geometry.
    Author:
    Ian Turton, CCG, Rob Hranac, Vision for New York
    • Constructor Summary

      Constructors 
      Constructor Description
      SubHandlerPolygon()
      Creates a new instance of GMLPolygonHandler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCoordinate​(Coordinate coordinate)
      Adds a coordinate to the current LinearRing.
      Geometry create​(GeometryFactory geometryFactory)
      Returns the completed OGC Polygon.
      boolean isComplete​(String message)
      Determines whether or not the geometry is ready to be returned.
      void subGeometry​(String message, int type)
      Catches inner and outer LinearRings messages and handles them appropriately.
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SubHandlerPolygon

        public SubHandlerPolygon()
        Creates a new instance of GMLPolygonHandler.
    • Method Detail

      • subGeometry

        public void subGeometry​(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​(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​(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 Geometry create​(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.