Class KMLReader


  • public class KMLReader
    extends java.lang.Object
    Constructs a Geometry object from the OGC KML representation. Works only with KML geometry elements and may also parse attributes within these elements
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Geometry read​(java.lang.String kmlGeometryString)
      Reads a KML representation of a Geometry from a String.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KMLReader

        public KMLReader()
        Creates a reader that creates objects using the default GeometryFactory.
      • KMLReader

        public KMLReader​(GeometryFactory geometryFactory)
        Creates a reader that creates objects using the given GeometryFactory.
        Parameters:
        geometryFactory - the factory used to create Geometrys.
      • KMLReader

        public KMLReader​(java.util.Collection<java.lang.String> attributeNames)
        Creates a reader that creates objects using the default GeometryFactory.
        Parameters:
        attributeNames - names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc).
      • KMLReader

        public KMLReader​(GeometryFactory geometryFactory,
                         java.util.Collection<java.lang.String> attributeNames)
        Creates a reader that creates objects using the given GeometryFactory.
        Parameters:
        geometryFactory - the factory used to create Geometrys.
        attributeNames - names of attributes that should be parsed (i.e. extrude, altitudeMode, tesselate, etc).
    • Method Detail

      • read

        public Geometry read​(java.lang.String kmlGeometryString)
                      throws ParseException
        Reads a KML representation of a Geometry from a String. If any attribute names were specified during KMLReader construction, they will be stored as Map in Geometry.setUserData(Object)
        Parameters:
        kmlGeometryString - string that specifies kml representation of geometry
        Returns:
        a Geometry specified by kmlGeometryString
        Throws:
        ParseException - if a parsing problem occurs