|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectWKTParser
public class WKTParser
This class is used to parse well known text (WKT) which describes an ISO 19107 Geometry. The grammar described comes from the ISO 19125-1 spec which describes feature geometry. It doesn't seem to exactly mesh up with the geometry as described in 19107 so not all of the grammar is supported.
The types in the WKT format, and their mappings:
Constructor Summary | |
---|---|
WKTParser(GeometryBuilder builder)
|
|
WKTParser(GeometryFactory geometryFactory,
PrimitiveFactory primitiveFactory,
PositionFactory positionFactory,
AggregateFactory aggregateFactory)
Constructor takes pre-created geometry and primitive factories that will be used to parse the Well Known Text (WKT). |
Method Summary | |
---|---|
Geometry |
parse(String text)
Takes a string containing well known text geometry description and wraps it in a Reader which is then passed on to parseWKT for handling. |
Geometry |
read(Reader reader)
Reads a Well-Known Text representation of a geometry from a Reader . |
void |
setFactory(GeometryFactory factory)
Provide a GeometryFactory for the parser. |
void |
setFactory(PositionFactory factory)
Provide a PositionFactory for the parser. |
void |
setFactory(PrimitiveFactory factory)
Provide a PrimitiveFactory for the parser. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WKTParser(GeometryBuilder builder)
public WKTParser(GeometryFactory geometryFactory, PrimitiveFactory primitiveFactory, PositionFactory positionFactory, AggregateFactory aggregateFactory)
CoordinateReferenceSystem
geometryFactory
- A GeometryFactory
created with a CoordinateReferenceSystem
and PrecisionModel
primitiveFactory
- A PrimitiveFactory
created with the same crs and precision as abovepositionFactory
- A PositionFactory
created with the same crs and precision as aboveaggregateFactory
- A AggregateFactory
created with the same crs and precision as aboveMethod Detail |
---|
public void setFactory(GeometryFactory factory)
Should be called prior to use.
factory
- public void setFactory(PrimitiveFactory factory)
Should be called prior to use.
factory
- public void setFactory(PositionFactory factory)
Should be called prior to use.
factory
- public Geometry parse(String text) throws ParseException
text
- A string containing the well known text to be parsed.
ParseException
public Geometry read(Reader reader) throws ParseException
Reader
.
reader
- a Reader which will return a [Geometry Tagged Text]
string (see the OpenGIS Simple Features Specification)
Geometry
read from reader
ParseException
- if a parsing problem occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |