|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.gml.geometry.GML3GeometryReader
public class GML3GeometryReader
Parser for geometry and geometry-related constructs from the GML 3 specification series (3.0/3.1/3.2).
Supports the following geometry elements:
PointLineStringCurveOrientableCurveCompositeCurveLinearRingRingPolygonSurfaceCompositeSurfaceOrientableSurfacePolyhedralSurfaceSurfaceTinTriangulatedSurfaceSolidCompositeSolidGeometricComplexMultiPointMultiLineStringMultiCurveMultiPolygonMultiSurfaceMultiGeometry
Additionally, parsing of Envelope elements is supported, parseEnvelope(XMLStreamReaderWrapper)
and parseGeometryOrEnvelope(XMLStreamReaderWrapper).
TODO Currently unsupported are the elements from the _ImplicitGeometry substitution group, i.e.
Grid and RectifiedGrid).
| Field Summary | |
|---|---|
protected GeometryFactory |
geomFac
|
protected String |
gmlNs
Namespace for the parsed GML elements, either CommonNamespaces.GMLNS or
CommonNamespaces.GML3_2_NS. |
protected GMLVersion |
version
|
| Constructor Summary | |
|---|---|
GML3GeometryReader(GMLVersion version,
GeometryFactory geomFac,
GMLDocumentIdContext idContext,
int defaultCoordDim)
Creates a new GML3GeometryReader instance. |
|
| Method Summary | |
|---|---|
protected ICRS |
determineActiveCRS(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Determines the active CRS using the value of the srsName attribute of the current geometry
element. |
protected int |
determineCoordDimensions(XMLStreamReaderWrapper xmlStream,
int defaultCoordDimensions)
Applies a simple heuristic to determine the number of coordinate dimensions. |
GMLDocumentIdContext |
getDocumentIdContext()
Returns the GMLDocumentIdContext that keeps track of objects, identifieres and references. |
boolean |
isGeometryElement(QName elName)
Returns whether the given element name denotes a GML 3.1.1 geometry element (a concrete element substitutable for "gml:_Geometry"). |
boolean |
isGeometryElement(XMLStreamReader reader)
|
boolean |
isGeometryOrEnvelopeElement(QName elName)
Returns whether the given element name denotes a GML 3.1.1 geometry (a concrete element substitutable for "gml:_Geometry") or envelope element. |
boolean |
isGeometryOrEnvelopeElement(XMLStreamReader reader)
|
Geometry |
parse(XMLStreamReaderWrapper xmlStream)
Returns the object representation for the given gml:_Geometry element event that the cursor of the
associated XMLStreamReader points at. |
Geometry |
parse(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_Geometry element event that the cursor of the
associated XMLStreamReader points at. |
Curve |
parseAbstractCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_Curve element event that the cursor of the
associated XMLStreamReader points at. |
Geometry |
parseAbstractGeometricComplex(XMLStreamReaderWrapper xmlStream,
CRS defaultCRS)
Returns the object representation for the given gml:_Geometry event that represents a geometric
complex (either gml:CompositeCurve, gml:CompositeSolid,
gml:CompositeSurface or gml:GeometricComplex), that the cursor of the given
XMLStreamReader points at. |
Ring |
parseAbstractRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:_Ring>) element. |
Solid |
parseAbstractSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:_Solid element. |
Surface |
parseAbstractSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:_Surface>) element. |
protected Angle |
parseAngleType(XMLStreamReaderWrapper xmlStream)
|
CompositeCurve |
parseCompositeCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:CompositeCurve element. |
CompositeSolid |
parseCompositeSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:CompositeSolid element. |
CompositeSurface |
parseCompositeSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:CompositeSurface element. |
protected List<Point> |
parseCoordinates(XMLStreamReaderWrapper xmlStream,
ICRS crs)
|
protected double[] |
parseCoordType(XMLStreamReaderWrapper xmlStream)
|
Curve |
parseCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:Curve element. |
Curve |
parseCurveProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:CurvePropertyType (such as
gml:curveProperty). |
protected Point |
parseDirectPositionType(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
|
protected double[] |
parseDoubleList(XMLStreamReaderWrapper xmlStream)
|
Envelope |
parseEnvelope(XMLStreamReaderWrapper xmlStream)
Returns the object representation of a gml:Envelope element. |
Envelope |
parseEnvelope(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:Envelope element. |
MultiGeometry<? extends Geometry> |
parseGeometricAggregate(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_GeometricAggregate element event that the
cursor of the given XMLStreamReader points at. |
CompositeGeometry<GeometricPrimitive> |
parseGeometricComplex(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:GeometricComplex element. |
GeometricPrimitive |
parseGeometricPrimitive(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_GeometricPrimitive element event that the
cursor of the associated XMLStreamReader points at. |
GeometricPrimitive |
parseGeometricPrimitiveProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:GeometricPrimitivePropertyType (such
as gml:element). |
Geometry |
parseGeometryOrEnvelope(XMLStreamReaderWrapper xmlStream)
Returns the object representation for the given gml:_Geometry/gml:Envelope element event that the
cursor of the associated XMLStreamReader points at. |
Geometry |
parseGeometryOrEnvelope(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_Geometry/gml:Envelope element event that the
cursor of the associated XMLStreamReader points at. |
Geometry |
parseGeometryProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:GeometryPropertyType (such as
gml:geometryMember). |
Geometry |
parseImplicitGeometry(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation for the given gml:_ImplicitGeometry element event that the cursor
of the associated XMLStreamReader points at. |
protected Length |
parseLengthType(XMLStreamReaderWrapper xmlStream)
|
LinearRing |
parseLinearRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:LinearRing element. |
LineString |
parseLineString(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:LineString element. |
LineString |
parseLineStringProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:LineStringPropertyType (such as
gml:lineStringProperty). |
protected Measure |
parseMeasureType(XMLStreamReaderWrapper xmlStream)
|
MultiCurve |
parseMultiCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiCurve element. |
MultiGeometry<Geometry> |
parseMultiGeometry(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiGeometry element. |
MultiLineString |
parseMultiLineString(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiLineString element. |
MultiPoint |
parseMultiPoint(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiPoint element. |
MultiPolygon |
parseMultiPolygon(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiPolygon element. |
MultiSolid |
parseMultiSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiSolid element. |
MultiSurface |
parseMultiSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:MultiSurface element. |
OrientableCurve |
parseOrientableCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:OrientableCurve element. |
OrientableSurface |
parseOrientableSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:OrientableSurface element. |
protected boolean |
parseOrientation(XMLStreamReaderWrapper xmlStream)
Parses the orientation attribute from element that the associated XMLStreamReader
points to. |
Point |
parsePoint(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:Point>) element. |
Point |
parsePointProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:PointPropertyType (such as
gml:pointProperty). |
Polygon |
parsePolygon(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:Polygon>) element. |
Polygon |
parsePolygonProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:PolygonPropertyType (such as
gml:polygonProperty). |
PolyhedralSurface |
parsePolyhedralSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:PolyhedralSurface>) element. |
protected List<Point> |
parsePosList(XMLStreamReaderWrapper xmlStream,
ICRS crs)
|
Ring |
parseRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a gml:Ring element. |
Solid |
parseSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:Solid>) element. |
Solid |
parseSolidProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:SolidPropertyType (such as
gml:solidProperty). |
Surface |
parseSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:Surface>) element. |
Surface |
parseSurfaceProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of an element with type gml:SurfacePropertyType (such as
gml:surfaceProperty). |
Tin |
parseTin(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:Tin>) element. |
TriangulatedSurface |
parseTriangulatedSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
Returns the object representation of a (<gml:TriangulatedSurface>) element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final GMLVersion version
protected final String gmlNs
CommonNamespaces.GMLNS or
CommonNamespaces.GML3_2_NS.
protected final GeometryFactory geomFac
| Constructor Detail |
|---|
public GML3GeometryReader(GMLVersion version,
GeometryFactory geomFac,
GMLDocumentIdContext idContext,
int defaultCoordDim)
GML3GeometryReader instance.
version - either GMLVersion.GML_30, GMLVersion.GML_31 or GMLVersion.GML_32geomFac - geometry factory to be used for creating geometry objects, can be nullidContext - id context for keeping track of objects and references, can be null| Method Detail |
|---|
public GMLDocumentIdContext getDocumentIdContext()
GMLDocumentIdContext that keeps track of objects, identifieres and references.
GMLDocumentIdContext, never nullpublic boolean isGeometryElement(XMLStreamReader reader)
isGeometryElement in interface GMLGeometryReaderXMLStreamConstants.START_ELEMENT && the current element's name is a
known geometry.public boolean isGeometryOrEnvelopeElement(XMLStreamReader reader)
isGeometryOrEnvelopeElement in interface GMLGeometryReaderXMLStreamConstants.START_ELEMENT && the current element's name is an
envelope.public boolean isGeometryElement(QName elName)
elName - qualified element name to check
public boolean isGeometryOrEnvelopeElement(QName elName)
elName - qualified element name to check
public Geometry parse(XMLStreamReaderWrapper xmlStream)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Geometry element event that the cursor of the
associated XMLStreamReader points at.
START_ELEMENT event (<gml:_Geometry>)END_ELEMENT event (</gml:_Geometry>)
GML 3.1.1 specifies the following elements to be directly substitutable for gml:_Geometry:
_GeometricPrimitive_Ring_GeometricAggregateGeometricComplex_ImplicitGeometry
parse in interface GMLGeometryReaderxmlStream - cursor must point at the START_ELEMENT event (<gml:_Geometry>), points at the
corresponding END_ELEMENT event (</gml:_Geometry>) afterwards
Geometry object
XMLParsingException - if the element is not a valid "gml:_Geometry" element
XMLStreamException
UnknownCRSException
public Geometry parse(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Geometry element event that the cursor of the
associated XMLStreamReader points at.
START_ELEMENT event (<gml:_Geometry>)END_ELEMENT event (</gml:_Geometry>)
GML 3.1.1 specifies the following elements to be directly substitutable for gml:_Geometry:
_GeometricPrimitive_Ring_GeometricAggregateGeometricComplex_ImplicitGeometry
parse in interface GMLGeometryReaderxmlStream - cursor must point at the jec event (<gml:_Geometry>), points at the corresponding
END_ELEMENT event (</gml:_Geometry>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Geometry object
XMLParsingException - if the element is not a valid "gml:_Geometry" element
XMLStreamException
UnknownCRSException
public Geometry parseGeometryOrEnvelope(XMLStreamReaderWrapper xmlStream)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Geometry/gml:Envelope element event that the
cursor of the associated XMLStreamReader points at.
START_ELEMENT event (<gml:_Geometry> or
<gml:Envelope>)END_ELEMENT event (</gml:_Geometry> or
<gml:Envelope>)
xmlStream - cursor must point at the START_ELEMENT event (<gml:_Geometry> or
<gml:Envelope>), points at the corresponding END_ELEMENT event
(</gml:_Geometry> or <gml:Envelope>) afterwards
Geometry object
XMLParsingException - if the element is not a valid gml:_Geometry or gml:Envelope element
XMLStreamException
UnknownCRSException
public Geometry parseGeometryOrEnvelope(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Geometry/gml:Envelope element event that the
cursor of the associated XMLStreamReader points at.
START_ELEMENT event (<gml:_Geometry> or
<gml:Envelope>)END_ELEMENT event (</gml:_Geometry> or
<gml:Envelope>)
parseGeometryOrEnvelope in interface GMLGeometryReaderxmlStream - cursor must point at the START_ELEMENT event (<gml:_Geometry> or
<gml:Envelope>), points at the corresponding END_ELEMENT event
(</gml:_Geometry> or <gml:Envelope>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Geometry object
XMLParsingException - if the element is not a valid gml:_Geometry or gml:Envelope element
XMLStreamException
UnknownCRSException
public GeometricPrimitive parseGeometricPrimitive(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_GeometricPrimitive element event that the
cursor of the associated XMLStreamReader points at.
START_ELEMENT event (<gml:_GeometricPrimitive>)END_ELEMENT event
(</gml:_GeometricPrimitive>)
GML 3.1.1 specifies the following elements to be directly substitutable for
gml:_GeometricPrimitive:
Point_Curve_Surface_Solid
xmlStream - cursor must point at the START_ELEMENT event (<gml:_GeometricPrimitive>), points at
the corresponding END_ELEMENT event (</gml:_GeometricPrimitive>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
GeometricPrimitive object
XMLParsingException - if the element is not a valid gml:_GeometricPrimitive element
XMLStreamException
UnknownCRSException
public MultiGeometry<? extends Geometry> parseGeometricAggregate(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_GeometricAggregate element event that the
cursor of the given XMLStreamReader points at.
START_ELEMENT event (<gml:_GeometricAggregate>)END_ELEMENT event
(</gml:_GeometricAggregate>)
GML 3.1.1 specifies the following concrete elements to be substitutable for gml:_GeometricAggregate:
MultiCurveMultiGeometryMultiLineStringMultiPointMultiPolygonMultiSolidMultiSurface
xmlStream - cursor must point at the START_ELEMENT event (<gml:_GeometricAggregate>), points at
the corresponding END_ELEMENT event (</gml:_GeometricAggregate>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
MultiGeometry object
XMLParsingException - if the element is not a valid "gml:_GeometricAggregate" element
XMLStreamException
UnknownCRSException
public Geometry parseAbstractGeometricComplex(XMLStreamReaderWrapper xmlStream,
CRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Geometry event that represents a geometric
complex (either gml:CompositeCurve, gml:CompositeSolid,
gml:CompositeSurface or gml:GeometricComplex), that the cursor of the given
XMLStreamReader points at.
START_ELEMENT eventEND_ELEMENT eventGML 3.1.1 specifies the following four concrete geometry elements with an geometry complex semantic:
CompositeCurveCompositeSolidCompositeSurfaceGeometricComplex
NOTE: For technical reasons (XML Schema does not support multiple inheritance), there is no substitution group
gml:_GeometricComplex defined in the GML schemas. However, it is described in the comments.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default crs for the geometry, this is only used if the geometry element has no own
srsName attribute
Geometry object
XMLParsingException - if the element is not a valid "gml:_Geometry" element with geometric complex semantic
XMLStreamException
UnknownCRSException
public Geometry parseImplicitGeometry(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException
gml:_ImplicitGeometry element event that the cursor
of the associated XMLStreamReader points at.
START_ELEMENT event (<gml:_ImplicitGeometry>)END_ELEMENT event
(</gml:_GeometricAggregate>)
GML 3.1.1 specifies the following two concrete elements to be substitutable for
gml:_ImplicitGeometry:
GridRectifiedGrid
xmlStream - cursor must point at the START_ELEMENT event (<gml:_ImplicitGeometry>), points at
the corresponding END_ELEMENT event (</gml:_ImplicitGeometry>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Geometry object
XMLParsingException - if the element is not a valid "gml:_ImplicitGeometry" element
XMLStreamException
public Curve parseAbstractCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Curve element event that the cursor of the
associated XMLStreamReader points at.
GML 3.1.1 specifies the following elements to be substitutable for gml:_Curve:
CompositeCurveCurveLineStringOrientableCurve
xmlStream - cursor must point at the START_ELEMENT event (<gml:_Curve>), points at the
corresponding END_ELEMENT event (</gml:_Curve>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Curve object
XMLParsingException - if the element is not a valid "gml:_Curve" element
XMLStreamException
UnknownCRSException
public Ring parseAbstractRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
XMLStream.
GML 3.1.1 specifies the following elements to be substitutable for gml:_Ring:
LinearRingRing
xmlStream - cursor must point at the START_ELEMENT event (<gml:_Ring>), points at the
corresponding END_ELEMENT event (</gml:_Ring>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Ring object
XMLParsingException - if the element is not a valid "gml:_Ring" element
XMLStreamException
UnknownCRSException
public Surface parseAbstractSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
XMLStream.
GML 3.1.1 specifies the following seven elements to be substitutable for gml:_Surface:
PolygonCompositeSurfaceOrientableSurfacePolyhedralSurfaceSurfaceTinTriangulatedSurface
xmlStream - cursor must point at the START_ELEMENT event (<gml:_Surface>), points at the
corresponding END_ELEMENT event (</gml:_Surface>) afterwardsdefaultCRS - default CRS for the geometry, this is only use CoordinateSystem the geometry element has no own
srsName attribute
Surface object
XMLParsingException - if the element is not a valid "gml:_Surface" element
XMLStreamException
UnknownCRSException
public Solid parseAbstractSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
gml:_Solid element. Consumes all corresponding events from
the associated XMLStream.
GML 3.1.1 specifies the following two elements to be substitutable for gml:_Solid elements:
CompositeSolidSolid
xmlStream - cursor must point at the START_ELEMENT event (<gml:_Solid>), points at the
corresponding END_ELEMENT event (</gml:_Solid>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the geometry element has no own
srsName attribute
Solid object
XMLParsingException - if the element is not a valid "gml:_Solid" element
XMLStreamException
UnknownCRSException
public Point parsePoint(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException,
UnknownCRSException
XMLStream.
START_ELEMENT event (<gml:Point>)END_ELEMENT (</gml:Point>)
xmlStream - cursor must point at the START_ELEMENT event (<gml:Point>), points at the
corresponding END_ELEMENT event (</gml:Point>) afterwardsdefaultCRS - default CRS for the geometry, this is used if the "gml:Point" has no srsName attribute
Point object
XMLParsingException - if the element is not a valid gml:Point element
XMLStreamException
UnknownCRSException
public LineString parseLineString(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:LineString element. Consumes all corresponding events
from the given XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:LineString>), points at the
corresponding END_ELEMENT event (</gml:LineString>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:LineString has no
srsName attribute
LineString object
XMLParsingException - if the element is not a valid gml:LineString element
XMLStreamException
UnknownCRSException
XMLParsingException
public Curve parseCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:Curve element. Consumes all corresponding events from the
associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Curve>), points at the
corresponding END_ELEMENT event (</gml:Curve>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:Curve has no
srsName attribute
Curve object
XMLStreamException
UnknownCRSException
XMLParsingException
public OrientableCurve parseOrientableCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
gml:OrientableCurve element. Consumes all corresponding
events from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:OrientableCurve>), points at the
corresponding END_ELEMENT event (</gml:OrientableCurve>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:OrientableCurve has no
srsName attribute
OrientableCurve object
XMLStreamException
UnknownCRSException
XMLParsingException
public LinearRing parseLinearRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:LinearRing element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:LinearRing>), points at the
corresponding END_ELEMENT event (</gml:LinearRing>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:LinearRing element has no
srsName attribute
Ring object
XMLStreamException
UnknownCRSException
XMLParsingException
public Ring parseRing(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
gml:Ring element. Consumes all corresponding events from the
given XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Ring>), points at the
corresponding END_ELEMENT event (</gml:Ring>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:Ring element has no
srsName attribute
Ring object
XMLStreamException
UnknownCRSException
XMLParsingException
public Polygon parsePolygon(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Polygon>), points at the
corresponding END_ELEMENT event (</gml:Polygon>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the "gml:Polygon" has no srsName
attribute
Polygon object
XMLStreamException
UnknownCRSException
XMLParsingException
public Surface parseSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Surface>), points at the
corresponding END_ELEMENT event (</gml:Surface>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the "gml:Surface" has no srsName
attribute
Surface object
XMLStreamException
UnknownCRSException
XMLParsingException
public PolyhedralSurface parsePolyhedralSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:PolyhedralSurface>), points at
the corresponding END_ELEMENT event (</gml:PolyhedralSurface>) afterwardsdefaultCRS - default CoordinateSystem for the geometry, this is only used if the "gml:PolyhedralSurface" has no
srsName attribute
PolyhedralSurface object
XMLStreamException
UnknownCRSException
XMLParsingException
public TriangulatedSurface parseTriangulatedSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:TriangulatedSurface>), points at
the corresponding END_ELEMENT event (</gml:TriangulatedSurface>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the "gml:TriangulatedSurface" has no
srsName attribute
TriangulatedSurface object
XMLStreamException
UnknownCRSException
XMLParsingException
public Tin parseTin(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
XMLStream.
Note: GML 3.1.1 specifies both "gml:trianglePatches" and "gml:controlPoint" properties for "gml:Tin". This is
apparently redundant, and consequently (?) GML 3.2.1 only allows the controlPoint property here. This method
copes with this by only using the controlPoints for building the Tin object.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Tin>), points at the
corresponding END_ELEMENT event (</gml:Tin>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the "gml:Tin" has no srsName attribute
Tin object
XMLStreamException
UnknownCRSException
XMLParsingException
public OrientableSurface parseOrientableSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:OrientableSurface element. Consumes all corresponding
events from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:OrientableSurface>), points at
the corresponding END_ELEMENT event (</gml:OrientableSurface>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:OrientableSurface has no
srsName attribute
OrientableSurface object
XMLStreamException
UnknownCRSException
XMLParsingException
public Solid parseSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Solid>), points at the
corresponding END_ELEMENT event (</gml:Solid>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the "gml:Solid" has no srsName
attribute
Solid object
XMLStreamException
UnknownCRSException
XMLParsingException
public CompositeCurve parseCompositeCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
UnknownCRSException
gml:CompositeCurve element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:CompositeCurve>), points at the
corresponding END_ELEMENT event (</gml:CompositeCurve>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:CompositeCurve has no
srsName attribute
CompositeCurve object
XMLStreamException
UnknownCRSException
XMLParsingException
public CompositeSurface parseCompositeSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:CompositeSurface element. Consumes all corresponding
events from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:CompositeSurface>), points at
the corresponding END_ELEMENT event (</gml:CompositeSurface>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:CompositeSurface has no
srsName attribute
CompositeSurface object
XMLStreamException
UnknownCRSException
XMLParsingException
public CompositeSolid parseCompositeSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:CompositeSolid element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:CompositeSolid>), points at the
corresponding END_ELEMENT event (</gml:CompositeSolid>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:CompositeSolid has no
srsName attribute
CompositeSolid object
XMLStreamException
UnknownCRSException
XMLParsingException
public CompositeGeometry<GeometricPrimitive> parseGeometricComplex(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:GeometricComplex element. Consumes all corresponding
events from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:GeometricComplex>), points at
the corresponding END_ELEMENT event (</gml:GeometricComplex>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:GeometricComplex has no
srsName attribute
CompositeGeometry object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiPoint parseMultiPoint(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiPoint element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiPoint>), points at the
corresponding END_ELEMENT event (</gml:MultiPoint>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiPoint has no
srsName attribute
MultiPoint object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiCurve parseMultiCurve(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiCurve element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiCurve>), points at the
corresponding END_ELEMENT event (</gml:MultiCurve>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiCurve has no
srsName attribute
MultiCurve object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiLineString parseMultiLineString(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiLineString element. Consumes all corresponding
events from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiLineString>), points at the
corresponding END_ELEMENT event (</gml:MultiLineString>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiLineString has no
srsName attribute
MultiLineString object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiSurface parseMultiSurface(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiSurface element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiSurface>), points at the
corresponding END_ELEMENT event (</gml:MultiSurface>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiSurface has no
srsName attribute
MultiSurface object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiPolygon parseMultiPolygon(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiPolygon element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiPolygon>), points at the
corresponding END_ELEMENT event (</gml:MultiPolygon>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiPolygon has no
srsName attribute
MultiPolygon object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiSolid parseMultiSolid(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiSolid element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiSolid>), points at the
corresponding END_ELEMENT event (</gml:MultiSolid>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiSolid has no
srsName attribute
MultiSolid object
XMLStreamException
UnknownCRSException
XMLParsingException
public MultiGeometry<Geometry> parseMultiGeometry(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:MultiGeometry element. Consumes all corresponding events
from the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:MultiGeometry>), points at the
corresponding END_ELEMENT event (</gml:MultiGeometry>) afterwardsdefaultCRS - default CRS for the geometry, this is only used if the gml:MultiGeometry has no
srsName attribute
MultiGeometry object
XMLStreamException
UnknownCRSException
XMLParsingException
public Envelope parseEnvelope(XMLStreamReaderWrapper xmlStream)
throws XMLParsingException,
XMLStreamException
gml:Envelope element. Consumes all corresponding events from
the associated XMLStream.
xmlStream - cursor must point at the START_ELEMENT event (<gml:Envelope>), points at the
corresponding END_ELEMENT event (</gml:Envelope>) afterwards
Envelope object
XMLStreamException
XMLParsingException
public Envelope parseEnvelope(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException
gml:Envelope element. Consumes all corresponding events from
the associated XMLStream.
parseEnvelope in interface GMLGeometryReaderxmlStream - cursor must point at the START_ELEMENT event (<gml:Envelope>), points at the
corresponding END_ELEMENT event (</gml:Envelope>) afterwardsdefaultCRS - default CRS for the envelope, this is only used if the gml:Envelope has no
srsName attribute itself
Envelope object
XMLStreamException
XMLParsingException
public Point parsePointProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:PointPropertyType (such as
gml:pointProperty). Consumes all corresponding events from the given XMLStream.
The point value may be specified using an inline gml:Point element or using an
xlink:href attribute. In the latter case, a PointReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:Point" has no srsName
attribute
Point object, this is a PointReference if the content is specified using
xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public LineString parseLineStringProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:LineStringPropertyType (such as
gml:lineStringProperty). Consumes all corresponding events from the given XMLStream.
The LineString value may be specified using an inline gml:LineString element or using an
xlink:href attribute. In the latter case, a LineStringReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:LineString" has no
srsName attribute
LineString object, this is a LineStringReference if the content is
specified using xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public Curve parseCurveProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:CurvePropertyType (such as
gml:curveProperty). Consumes all corresponding events from the given XMLStream.
The curve value may be specified using an inline gml:_Curve element or using an
xlink:href attribute. In the latter case, a CurveReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:_Curve" has no srsName
attribute
Curve object, this is a CurveReference if the content is specified using
xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public Polygon parsePolygonProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:PolygonPropertyType (such as
gml:polygonProperty). Consumes all corresponding events from the given XMLStream.
The polygon value may be specified using an inline gml:Polygon element or using an
xlink:href attribute. In the latter case, a PolygonReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:Polygon" has no srsName
attribute
Polygon object, this is a PolygonReference if the content is specified
using xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public Surface parseSurfaceProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:SurfacePropertyType (such as
gml:surfaceProperty). Consumes all corresponding events from the given XMLStream.
The curve value may be specified using an inline gml:_Surface element or using an
xlink:href attribute. In the latter case, a SurfaceReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:_Surface" has no srsName
attribute
Surface object, this is a SurfaceReference if the content is specified
using xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public Solid parseSolidProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:SolidPropertyType (such as
gml:solidProperty). Consumes all corresponding events from the given XMLStream.
The solid value may be specified using an inline gml:Solid element or using an
xlink:href attribute. In the latter case, a SolidReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:Solid" has no srsName
attribute
Solid object, this is a SolidReference if the content is specified using
xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public GeometricPrimitive parseGeometricPrimitiveProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:GeometricPrimitivePropertyType (such
as gml:element). Consumes all corresponding events from the given XMLStream.
The solid value may be specified using an inline gml:_GeometricPrimitive element or using an
xlink:href attribute. In the latter case, a GeometricPrimitiveReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:_GeometricPrimitive" has no
srsName attribute
GeometricPrimitive object, this is a GeometricPrimitiveReference if the
content is specified using xlink
XMLStreamException
UnknownCRSException
XMLParsingException
public Geometry parseGeometryProperty(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLStreamException,
XMLParsingException,
UnknownCRSException
gml:GeometryPropertyType (such as
gml:geometryMember). Consumes all corresponding events from the given XMLStream.
The geometry value may be specified using an inline gml:_Geometry element or using an
xlink:href attribute. In the latter case, a GeometryReference object is returned.
xmlStream - cursor must point at the START_ELEMENT event, points at the corresponding
END_ELEMENT event afterwardsdefaultCRS - default CRS for the geometry, this is used if the contained "gml:_Geometry" has no
srsName attribute
Geometry object, this is a GeometryReference if the content is specified
using xlink
XMLStreamException
UnknownCRSException
XMLParsingException
protected Point parseDirectPositionType(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
throws XMLParsingException,
XMLStreamException
XMLParsingException
XMLStreamException
protected List<Point> parsePosList(XMLStreamReaderWrapper xmlStream,
ICRS crs)
throws XMLParsingException,
XMLStreamException
XMLParsingException
XMLStreamException
protected List<Point> parseCoordinates(XMLStreamReaderWrapper xmlStream,
ICRS crs)
throws XMLParsingException,
XMLStreamException
XMLParsingException
XMLStreamException
protected double[] parseCoordType(XMLStreamReaderWrapper xmlStream)
throws XMLStreamException
XMLStreamException
protected Length parseLengthType(XMLStreamReaderWrapper xmlStream)
throws XMLStreamException
XMLStreamException
protected Angle parseAngleType(XMLStreamReaderWrapper xmlStream)
throws XMLStreamException
XMLStreamException
protected Measure parseMeasureType(XMLStreamReaderWrapper xmlStream)
throws XMLStreamException
XMLStreamException
protected ICRS determineActiveCRS(XMLStreamReaderWrapper xmlStream,
ICRS defaultCRS)
CRS using the value of the srsName attribute of the current geometry
element.
defaultCRS - default CSR for the geometry, this is returned if the geometry element has no srsName
attribute
protected double[] parseDoubleList(XMLStreamReaderWrapper xmlStream)
throws XMLParsingException,
XMLStreamException
XMLParsingException
XMLStreamExceptionprotected boolean parseOrientation(XMLStreamReaderWrapper xmlStream)
orientation attribute from element that the associated XMLStreamReader
points to.
orientation is '+' or not present, false if the attribute is '-'
protected int determineCoordDimensions(XMLStreamReaderWrapper xmlStream,
int defaultCoordDimensions)
defaultCoordDimensions - default coordinate dimensionality, this is returned if the element has no srsDimension
attribute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||