GML3GeometryReader extends GML3GeometryBaseReader implements GMLGeometryReader { public Envelope parseEnvelope( XMLStreamReaderWrapper xmlStream ) throws XMLParsingException, XMLStreamException { return parseEnvelope( xmlStream, null ); } GML3GeometryReader( GMLStreamReader gmlStream ); @Override boolean isGeometryElement( XMLStreamReader reader ); @Override boolean isGeometryOrEnvelopeElement( XMLStreamReader reader ); boolean isGeometryElement( QName elName ); boolean isGeometryOrEnvelopeElement( QName elName ); @Override Geometry parse( XMLStreamReaderWrapper xmlStream ); @Override Geometry parse( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Geometry parseGeometryOrEnvelope( XMLStreamReaderWrapper xmlStream ); @Override Geometry parseGeometryOrEnvelope( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); GeometricPrimitive parseGeometricPrimitive( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiGeometry<? extends Geometry> parseGeometricAggregate( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Geometry parseAbstractGeometricComplex( XMLStreamReaderWrapper xmlStream, CRS defaultCRS ); Geometry parseImplicitGeometry( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Curve parseAbstractCurve( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Ring parseAbstractRing( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Surface parseAbstractSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Solid parseAbstractSolid( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Point parsePoint( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); LineString parseLineString( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Curve parseCurve( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); OrientableCurve parseOrientableCurve( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); LinearRing parseLinearRing( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Ring parseRing( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Polygon parsePolygon( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Surface parseSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); PolyhedralSurface parsePolyhedralSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); TriangulatedSurface parseTriangulatedSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Tin parseTin( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); OrientableSurface parseOrientableSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Solid parseSolid( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); CompositeCurve parseCompositeCurve( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); CompositeSurface parseCompositeSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); CompositeSolid parseCompositeSolid( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); CompositeGeometry<GeometricPrimitive> parseGeometricComplex( XMLStreamReaderWrapper xmlStream,
                                                                        ICRS defaultCRS ); MultiPoint parseMultiPoint( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiCurve<?> parseMultiCurve( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiLineString parseMultiLineString( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiSurface<?> parseMultiSurface( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiPolygon parseMultiPolygon( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiSolid parseMultiSolid( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); MultiGeometry<Geometry> parseMultiGeometry( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Envelope parseEnvelope( XMLStreamReaderWrapper xmlStream ); @Override Envelope parseEnvelope( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Point parsePointProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); LineString parseLineStringProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Curve parseCurveProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Polygon parsePolygonProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Surface parseSurfaceProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Solid parseSolidProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); GeometricPrimitive parseGeometricPrimitiveProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS ); Geometry parseGeometryProperty( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS );  }
@Test public void parseEnvelope() throws XMLStreamException, FactoryConfigurationError, IOException, UnknownCRSException { GMLStreamReader gmlReader = getParser( "Envelope.gml" ); XMLStreamReaderWrapper xmlReader = new XMLStreamReaderWrapper( gmlReader.getXMLReader(), null ); Assert.assertEquals( XMLStreamConstants.START_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Envelope envelope = gmlReader.getGeometryReader().parseEnvelope( xmlReader, null ); Assert.assertEquals( XMLStreamConstants.END_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Assert.assertEquals( 11.0, envelope.getMin().get0(), DELTA ); Assert.assertEquals( 22.0, envelope.getMin().get1(), DELTA ); Assert.assertEquals( 44.0, envelope.getMax().get0(), DELTA ); Assert.assertEquals( 88.0, envelope.getMax().get1(), DELTA ); Assert.assertEquals( CRSManager.lookup( "EPSG:4326" ), envelope.getCoordinateSystem() ); }
@Test public void parseEnvelopeCoord() throws XMLStreamException, FactoryConfigurationError, IOException, UnknownCRSException { GMLStreamReader gmlReader = getParser( "Envelope_coord.gml" ); XMLStreamReaderWrapper xmlReader = new XMLStreamReaderWrapper( gmlReader.getXMLReader(), null ); Assert.assertEquals( XMLStreamConstants.START_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Envelope envelope = gmlReader.getGeometryReader().parseEnvelope( xmlReader, null ); Assert.assertEquals( XMLStreamConstants.END_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Assert.assertEquals( 11.0, envelope.getMin().get0(), DELTA ); Assert.assertEquals( 22.0, envelope.getMin().get1(), DELTA ); Assert.assertEquals( 44.0, envelope.getMax().get0(), DELTA ); Assert.assertEquals( 88.0, envelope.getMax().get1(), DELTA ); Assert.assertEquals( CRSManager.lookup( "EPSG:4326" ), envelope.getCoordinateSystem() ); }
@Test public void parseEnvelopePos() throws XMLStreamException, FactoryConfigurationError, IOException, UnknownCRSException { GMLStreamReader gmlReader = getParser( "Envelope_pos.gml" ); XMLStreamReaderWrapper xmlReader = new XMLStreamReaderWrapper( gmlReader.getXMLReader(), null ); Assert.assertEquals( XMLStreamConstants.START_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Envelope envelope = gmlReader.getGeometryReader().parseEnvelope( xmlReader, null ); Assert.assertEquals( XMLStreamConstants.END_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Assert.assertEquals( 11.0, envelope.getMin().get0(), DELTA ); Assert.assertEquals( 22.0, envelope.getMin().get1(), DELTA ); Assert.assertEquals( 44.0, envelope.getMax().get0(), DELTA ); Assert.assertEquals( 88.0, envelope.getMax().get1(), DELTA ); Assert.assertEquals( CRSManager.lookup( "EPSG:4326" ), envelope.getCoordinateSystem() ); }
@Test public void parseEnvelopeCoordinates() throws XMLStreamException, FactoryConfigurationError, IOException, UnknownCRSException { GMLStreamReader gmlReader = getParser( "Envelope_coordinates.gml" ); XMLStreamReaderWrapper xmlReader = new XMLStreamReaderWrapper( gmlReader.getXMLReader(), null ); Assert.assertEquals( XMLStreamConstants.START_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Envelope envelope = gmlReader.getGeometryReader().parseEnvelope( xmlReader, null ); Assert.assertEquals( XMLStreamConstants.END_ELEMENT, xmlReader.getEventType() ); Assert.assertEquals( new QName( "http: Assert.assertEquals( 11.0, envelope.getMin().get0(), DELTA ); Assert.assertEquals( 22.0, envelope.getMin().get1(), DELTA ); Assert.assertEquals( 44.0, envelope.getMax().get0(), DELTA ); Assert.assertEquals( 88.0, envelope.getMax().get1(), DELTA ); Assert.assertEquals( CRSManager.lookup( "EPSG:4326" ), envelope.getCoordinateSystem() ); }