Package org.locationtech.jts.io.kml
Class KMLReader
- java.lang.Object
-
- org.locationtech.jts.io.kml.KMLReader
-
-
Constructor Summary
Constructors Constructor Description KMLReader()
Creates a reader that creates objects using the defaultGeometryFactory
.KMLReader(Collection<String> attributeNames)
Creates a reader that creates objects using the defaultGeometryFactory
.KMLReader(GeometryFactory geometryFactory)
Creates a reader that creates objects using the givenGeometryFactory
.KMLReader(GeometryFactory geometryFactory, Collection<String> attributeNames)
Creates a reader that creates objects using the givenGeometryFactory
.
-
-
-
Constructor Detail
-
KMLReader
public KMLReader()
Creates a reader that creates objects using the defaultGeometryFactory
.
-
KMLReader
public KMLReader(GeometryFactory geometryFactory)
Creates a reader that creates objects using the givenGeometryFactory
.- Parameters:
geometryFactory
- the factory used to createGeometry
s.
-
KMLReader
public KMLReader(Collection<String> attributeNames)
Creates a reader that creates objects using the defaultGeometryFactory
.- Parameters:
attributeNames
- names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc).
-
KMLReader
public KMLReader(GeometryFactory geometryFactory, Collection<String> attributeNames)
Creates a reader that creates objects using the givenGeometryFactory
.- Parameters:
geometryFactory
- the factory used to createGeometry
s.attributeNames
- names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc).
-
-
Method Detail
-
read
public Geometry read(String kmlGeometryString) throws ParseException
Reads a KML representation of aGeometry
from aString
. If any attribute names were specified duringKMLReader
construction, they will be stored asMap
inGeometry.setUserData(Object)
- Parameters:
kmlGeometryString
- string that specifies kml representation of geometry- Returns:
- a
Geometry
specified bykmlGeometryString
- Throws:
ParseException
- if a parsing problem occurs
-
-