Class XmlStreamGeometryReader


  • public class XmlStreamGeometryReader
    extends Object
    Parse GML geometries from a StAX XMLStreamReader.
    • Field Detail

      • DEFAULT_CURVE_TOLERANCE

        public static final double DEFAULT_CURVE_TOLERANCE
        See Also:
        Constant Field Values
    • Constructor Detail

      • XmlStreamGeometryReader

        public XmlStreamGeometryReader​(XMLStreamReader reader)
        Create a new instance of the XML Stream Geometry Reader.
        Parameters:
        reader - the reader providing the data to parse
      • XmlStreamGeometryReader

        public XmlStreamGeometryReader​(XMLStreamReader reader,
                                       GeometryFactory geometryFactory)
        Create a new instance of the XML Stream Geometry Reader.
        Parameters:
        reader - the reader providing the data to parse
        geometryFactory - a specific GeometryFactory to use for constructing geometries
      • XmlStreamGeometryReader

        public XmlStreamGeometryReader​(XMLStreamReader reader,
                                       GeometryFactory geometryFactory,
                                       CurvedGeometryFactory curvedGeometryFactory)
        Create a new instance of the XML Stream Geometry Reader.
        Parameters:
        reader - the reader providing the data to parse
        geometryFactory - a specific GeometryFactory to use for constructing geometries
        curvedGeometryFactory - a specific CurvedGeometryFactory to use for constructing curved geometries
    • Method Detail

      • setGeometryFactory

        public void setGeometryFactory​(GeometryFactory geometryFactory)
      • isUnsafeXMLAllowed

        public boolean isUnsafeXMLAllowed()
      • setUnsafeXMLAllowed

        public void setUnsafeXMLAllowed​(boolean unsafeXMLAllowed)
        Parameters:
        unsafeXMLAllowed - true if you want to parse from an XMLStreamReader not configured for safe XML parsing (XMLInputFactory.SUPPORT_DTD is true)
      • setInvertAxisNeeded

        public void setInvertAxisNeeded​(Predicate<CoordinateReferenceSystem> invertAxisNeeded)
        By default axis are not inverted, you can provide a predicate that determines whether axes need to be inverted for a CRS (only called once per CRS).