|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jts.io.WKTReader
Converts a geometry in Well-Known Text format to a Geometry.
WKTReader supports
extracting Geometry objects from either Readers or
Strings. This allows it to function as a parser to read Geometry
objects from text blocks embedded in other data formats (e.g. XML).
A WKTReader is parameterized by a GeometryFactory,
to allow it to create Geometry objects of the appropriate
implementation. In particular, the GeometryFactory
determines the PrecisionModel and SRID that is
used.
The WKTReader converts all input numbers to the precise
internal representation.
WKTGeometry: one of
WKTPoint WKTLineString WKTLinearRing WKTPolygon
WKTMultiPoint WKTMultiLineString WKTMultiPolygon
WKTGeometryCollection
WKTPoint: POINT ( Coordinate )
WKTLineString: LINESTRING CoordinateSequence
WKTLinearRing: LINEARRING CoordinateSequence
WKTPolygon: POLYGON CoordinateSequenceList
WKTMultiPoint: MULTIPOINT CoordinateSequence
WKTMultiLineString: MULTILINESTRING CoordinateSequenceList
WKTMultiPolygon:
MULTIPOLYGON ( CoordinateSequenceList { , CoordinateSequenceList } )
WKTGeometryCollection:
GEOMETRYCOLLECTION ( WKTGeometry { , WKTGeometry } )
CoordinateSequenceList:
( CoordinateSequence { , CoordinateSequence } )
CoordinateSequence:
( Coordinate { , Coordinate } )
Coordinate:
Number Number Numberopt
Number: A Java-style floating-point number
WKTWriter| Constructor Summary | |
WKTReader()
Creates a reader that creates objects using the default GeometryFactory. |
|
WKTReader(GeometryFactory geometryFactory)
Creates a reader that creates objects using the given GeometryFactory. |
|
| Method Summary | |
Geometry |
read(java.io.Reader reader)
Reads a Well-Known Text representation of a Geometry
from a Reader. |
Geometry |
read(java.lang.String wellKnownText)
Reads a Well-Known Text representation of a Geometry
from a String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WKTReader()
GeometryFactory.
public WKTReader(GeometryFactory geometryFactory)
GeometryFactory.
geometryFactory - the factory used to create Geometrys.| Method Detail |
public Geometry read(java.lang.String wellKnownText)
throws ParseException
Geometry
from a String.
wellKnownText - one or more Geometry specified by wellKnownText
ParseException - if a parsing problem occurs
public Geometry read(java.io.Reader reader)
throws ParseException
Geometry
from a Reader.
reader - a Reader which will return a 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 | |||||||||