Package org.geotools.gml
Class SubHandler
Object
SubHandler
- Direct Known Subclasses:
SubHandlerBox,SubHandlerLinearRing,SubHandlerLineString,SubHandlerMulti,SubHandlerPoint,SubHandlerPolygon
Specifies how a generic OGC simple geometry handler should behave.
- Author:
- Ian Turton, CCG, Rob Hranac, Vision for New York
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates end of a geometry.static final intIndicates start of a geometry.static final intIndicates a sub geometry message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddCoordinate(Coordinate coordinate) Adds a coordinate to the object being built if appropriate.abstract Geometrycreate(GeometryFactory geometryFactory) Creates a new JTS geometry.protected intgetSRID()Creates a basic SRID by looking at the provided srs.protected StringgetSRS()abstract booleanisComplete(String message) Determines whether or not the geometry is ready to return.voidvoidsubGeometry(String message, int type) Tells the handler that it just saw a subhandler.toString()Describes the handler.
-
Field Details
-
GEOMETRY_START
public static final int GEOMETRY_STARTIndicates start of a geometry.- See Also:
-
GEOMETRY_END
public static final int GEOMETRY_ENDIndicates end of a geometry.- See Also:
-
GEOMETRY_SUB
public static final int GEOMETRY_SUBIndicates a sub geometry message.- See Also:
-
-
Constructor Details
-
SubHandler
public SubHandler()
-
-
Method Details
-
getSRS
- Returns:
- the srs
-
getSRID
protected int getSRID()Creates a basic SRID by looking at the provided srs.As an example "EPSG:4326" would be turned into 4326
- Returns:
- An int value based on the srs field, or 0
-
setSRS
-
addCoordinate
Adds a coordinate to the object being built if appropriate.- Parameters:
coordinate- Coordinate to add
-
subGeometry
Tells the handler that it just saw a subhandler.- Parameters:
message- The sub geometry message (i.e. isInnerBoundary).type- The type of sub message (start, end, etc.)
-
isComplete
Determines whether or not the geometry is ready to return.- Parameters:
message- The geometry to inspect.- Returns:
- Flag for a complete geometry.
-
create
Creates a new JTS geometry.- Parameters:
geometryFactory- The JTS geometry factory to use for geometry creation.- Returns:
- An OGC simple geometry type for return.
-
toString
Describes the handler.
-