public class KmlGeometryUnmarshaller extends Object
<Model>) from DOM sources to JTS Geometry objects. The
following geometry elements are supported: Point, LineString, LinearRing,
Polygon, and MultiGeometry.| Constructor and Description |
|---|
KmlGeometryUnmarshaller()
Creates an unmarshaller for KML 2.2 geometry elements.
|
KmlGeometryUnmarshaller(String namespaceURI)
Constructs an unmarshaller for KML geometry elements in the given target
namespace.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) CoordinateArraySequence |
buildCoordinateArraySequence(Node coords)
Builds a raw coordinate sequence from the tuples included in a given
coordinates element.
|
Geometry |
unmarshalKmlGeometry(Node node)
Creates a JTS geometry object from a KML 2.x geometry representation.
|
(package private) LinearRing |
unmarshalLinearRing(Element geoElem)
Creates a LinearRing geometry object from a source KML2 LinearRing
representation.
|
(package private) LineString |
unmarshalLineString(Element geoElem)
Creates a LineString object from a KML2 LineString representation.
|
(package private) GeometryCollection |
unmarshalMultiGeometry(Element geoElem)
Creates a GeometryCollection geometry object from a source KML2
MultiGeometry representation with one or more geometry members.
|
(package private) Point |
unmarshalPoint(Element geoElem)
Creates a Point geometry object from a source KML2 Point representation.
|
(package private) Polygon |
unmarshalPolygon(Element geoElem)
Creates a Polygon geometry object from a source KML2 Polygon
representation.
|
public KmlGeometryUnmarshaller()
public KmlGeometryUnmarshaller(String namespaceURI)
namespaceURI - The name of the target namespace (an absolute URI value).public Geometry unmarshalKmlGeometry(Node node)
node - a DOM Document or Element node representation of a KML 2
geometry element.Point unmarshalPoint(Element geoElem)
geoElem - A DOM Element representing a kml:Point element.LineString unmarshalLineString(Element geoElem)
geoElem - a DOM Element representing a gml:LineString element.LinearRing unmarshalLinearRing(Element geoElem)
geoElem - a DOM Element representing a kml:LinearRing element.Polygon unmarshalPolygon(Element geoElem)
geoElem - a DOM Element representing a kml:Polygon element.GeometryCollection unmarshalMultiGeometry(Element geoElem)
geoElem - a DOM Element representing a kml:MultiGeometry element.CoordinateArraySequence buildCoordinateArraySequence(Node coords)
IllegalArgumentException is thrown if a coordinate tuple is
is not 2D or 3D.coords - a DOM Node representing a kml:coordinates elementCopyright © 2014 Open Geospatial Consortium. All rights reserved.