public class StreamGeometryWriter extends AbstractTypeMatcher<Class<? extends com.vividsolutions.jts.geom.Geometry>>
Constructor and Description |
---|
StreamGeometryWriter(String gmlNs,
boolean simplifyGeometry)
Constructor
|
Modifier and Type | Method and Description |
---|---|
List<DefinitionPath> |
findCandidates(PropertyDefinition property,
Class<? extends com.vividsolutions.jts.geom.Geometry> geomType)
Find candidates for a possible path to use for writing the geometry
|
static StreamGeometryWriter |
getDefaultInstance(String gmlNs,
boolean simplifyGeometry)
Get a geometry writer instance with a default configuration.
|
protected DefinitionPath |
matchPath(TypeDefinition type,
Class<? extends com.vividsolutions.jts.geom.Geometry> geomType,
DefinitionPath path)
Determines if a type definition is compatible to a geometry type
|
void |
registerGeometryWriter(GeometryWriter<?> writer)
Register a geometry writer
|
void |
write(XMLStreamWriter writer,
com.vividsolutions.jts.geom.Geometry geometry,
PropertyDefinition property,
String srsName)
Write a geometry to a stream for a GML document
|
findCandidates
public StreamGeometryWriter(String gmlNs, boolean simplifyGeometry)
gmlNs
- the GML namespacesimplifyGeometry
- if geometries should be simplified before writing
them if possible (e.g. a MultiGeometry with only one geometry
is reduced to the contained geometry)public static StreamGeometryWriter getDefaultInstance(String gmlNs, boolean simplifyGeometry)
gmlNs
- the GML namespacesimplifyGeometry
- if geometries should be simplified before writing
them if possible (e.g. a MultiGeometry with only one geometry
is reduced to the contained geometry)public void registerGeometryWriter(GeometryWriter<?> writer)
writer
- the geometry writerpublic void write(XMLStreamWriter writer, com.vividsolutions.jts.geom.Geometry geometry, PropertyDefinition property, String srsName) throws XMLStreamException
writer
- the XML stream writergeometry
- the geometryproperty
- the geometry propertysrsName
- the SRS name of a common SRS for the whole document, may
be null
XMLStreamException
- if any error occurs writing the geometrypublic List<DefinitionPath> findCandidates(PropertyDefinition property, Class<? extends com.vividsolutions.jts.geom.Geometry> geomType)
property
- the start propertygeomType
- the geometry typeprotected DefinitionPath matchPath(TypeDefinition type, Class<? extends com.vividsolutions.jts.geom.Geometry> geomType, DefinitionPath path)
matchPath
in class AbstractTypeMatcher<Class<? extends com.vividsolutions.jts.geom.Geometry>>
type
- the type definitiongeomType
- the geometry typepath
- the current definition pathnull
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a