org.deegree.gml
Class XMLTransformer
java.lang.Object
org.deegree.cs.Transformer
org.deegree.geometry.GeometryTransformer
org.deegree.gml.XMLTransformer
public class XMLTransformer
- extends org.deegree.geometry.GeometryTransformer
The XMLTransformer
transforms any xml documents containing gml geometries. Only the geometries will be
transformed all other data (including comments and cdata) will be copied.
- Version:
- $Revision: 31619 $, $Date: 2011-08-23 14:56:28 +0200 (Tue, 23 Aug 2011) $
- Author:
- Rutger Bezema, last edited by: $Author: mschneider $
Methods inherited from class org.deegree.geometry.GeometryTransformer |
createValidDomain, transform, transform, transform, transform, transform |
Methods inherited from class org.deegree.cs.Transformer |
createCRSTransformation, createCRSTransformation, createCRSTransformation, getTargetCRS |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLTransformer
public XMLTransformer(org.deegree.cs.coordinatesystems.ICRS targetCRS)
throws IllegalArgumentException
- Parameters:
targetCRS
-
- Throws:
IllegalArgumentException
org.deegree.cs.exceptions.UnknownCRSException
XMLTransformer
public XMLTransformer(String targetCRS)
throws IllegalArgumentException,
org.deegree.cs.exceptions.UnknownCRSException
- Parameters:
targetCRS
-
- Throws:
IllegalArgumentException
org.deegree.cs.exceptions.UnknownCRSException
XMLTransformer
public XMLTransformer(org.deegree.cs.transformations.Transformation transformation)
throws IllegalArgumentException
- Parameters:
transformation
-
- Throws:
IllegalArgumentException
transform
public void transform(XMLStreamReader reader,
XMLStreamWriter writer,
org.deegree.cs.coordinatesystems.ICRS sourceCRS,
GMLVersion gmlVersion,
boolean testValidArea,
List<org.deegree.cs.transformations.Transformation> requestedTransformation)
throws XMLStreamException,
org.deegree.commons.xml.XMLParsingException,
IllegalArgumentException,
org.deegree.cs.exceptions.OutsideCRSDomainException,
org.deegree.cs.exceptions.UnknownCRSException,
org.deegree.cs.exceptions.TransformationException
- Transforms the given input stream, and streams the input into the output directly. If a geometry is found, the
geometry is transformed into the target crs. All other events are just copied.
- Parameters:
reader
- an XMLStream containing some GML Geometries.writer
- the output will be written to this writer, the writer have been opened (
XMLStreamWriter.writeStartDocument()
. No XMLStreamWriter.writeEndDocument()
will be
written as well.sourceCRS
- to be used if the geometries do not define a srsName (or the like) attribute.gmlVersion
- the version of the expected geometries.testValidArea
- true if the incoming geometries should be checked against the valid domain of the crs they are defined
in.requestedTransformation
- can be null
- Throws:
XMLStreamException
org.deegree.commons.xml.XMLParsingException
IllegalArgumentException
org.deegree.cs.exceptions.OutsideCRSDomainException
org.deegree.cs.exceptions.UnknownCRSException
org.deegree.cs.exceptions.TransformationException
transform
public void transform(XMLStreamReader reader,
XMLStreamWriter writer,
GMLVersion gmlVersion)
throws XMLStreamException,
org.deegree.commons.xml.XMLParsingException,
IllegalArgumentException,
org.deegree.cs.exceptions.OutsideCRSDomainException,
org.deegree.cs.exceptions.UnknownCRSException,
org.deegree.cs.exceptions.TransformationException
- Transforms the given input stream, and streams the input into the output directly. If a geometry is found, the
geometry is transformed into the target crs. All other events are just copied.
- Parameters:
reader
- an XMLStream containing some GML Geometries.writer
- the output will be written to this writer, the writer have been opened (
XMLStreamWriter.writeStartDocument()
. No XMLStreamWriter.writeEndDocument()
will be
written as well.gmlVersion
- the version of the expected geometries.
- Throws:
XMLStreamException
org.deegree.commons.xml.XMLParsingException
IllegalArgumentException
org.deegree.cs.exceptions.OutsideCRSDomainException
org.deegree.cs.exceptions.UnknownCRSException
org.deegree.cs.exceptions.TransformationException
Copyright © 2011. All Rights Reserved.