|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.cs.Transformer
org.deegree.geometry.GeometryTransformer
public class GeometryTransformer
Transforms a geometry defined in a CoordinateSystem
into a geometry defined in another
CoordinateSystem
Constructor Summary | |
---|---|
GeometryTransformer(CoordinateSystem targetCRS)
Creates a new GeometryTransformer object. |
|
GeometryTransformer(CRS targetCRS)
Creates a new GeometryTransformer object. |
|
GeometryTransformer(java.lang.String targetCRS)
Creates a new GeometryTransformer object, with the given id as the target CRS. |
|
GeometryTransformer(Transformation definedTransformation)
|
Method Summary | ||
---|---|---|
static Envelope |
createValidDomain(CoordinateSystem sourceCRS)
Creates an envelope in the given CRS of the Area of Use (defined in WGS84) of the given Coordinate System. |
|
Geometry |
transform(Geometry geo,
boolean testValidDomain)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
|
Geometry |
transform(Geometry geo,
CoordinateSystem sourceCRS)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
|
Geometry |
transform(Geometry geo,
java.lang.String sourceCRS)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
|
|
transform(T geo)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
|
|
transform(T geom,
CoordinateSystem sourceCRS,
boolean testValidArea,
java.util.List<Transformation> toBeUsedTransformations)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
Methods inherited from class org.deegree.cs.Transformer |
---|
createCRSTransformation, createCRSTransformation, createCRSTransformation, getTargetCRS, getWrappedTargetCRS |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeometryTransformer(CoordinateSystem targetCRS) throws java.lang.IllegalArgumentException
targetCRS
-
java.lang.IllegalArgumentException
- if the given parameter is null.public GeometryTransformer(CRS targetCRS) throws java.lang.IllegalArgumentException, UnknownCRSException
targetCRS
-
java.lang.IllegalArgumentException
- if the given parameter is null.
UnknownCRSException
public GeometryTransformer(java.lang.String targetCRS) throws UnknownCRSException, java.lang.IllegalArgumentException
targetCRS
- an identifier to which all other CRS's shall be transformed.
UnknownCRSException
- if the given crs name could not be mapped to a valid (configured) crs.
java.lang.IllegalArgumentException
- if the given parameter is null.public GeometryTransformer(Transformation definedTransformation) throws java.lang.IllegalArgumentException
definedTransformation
- to use instead of the CRSFactory.
java.lang.IllegalArgumentException
- if the given parameter is null.Method Detail |
---|
public <T extends Geometry> T transform(T geo) throws TransformationException, java.lang.IllegalArgumentException, UnknownCRSException
T
- geo
- to be transformed
TransformationException
- if the transformation between the source and target crs cannot be created.
java.lang.IllegalArgumentException
- if the coordinates system of the geometry is null
UnknownCRSException
public Geometry transform(Geometry geo, boolean testValidDomain) throws TransformationException, java.lang.IllegalArgumentException, UnknownCRSException
geo
- to be transformedtestValidDomain
- true if the incoming geometry should be checked against the domain of validity of the CoordinateSystem
it is defined in.
TransformationException
- if the transformation between the source and target crs cannot be created.
java.lang.IllegalArgumentException
- if the coordinates system of the geometry is null
UnknownCRSException
public static Envelope createValidDomain(CoordinateSystem sourceCRS)
sourceCRS
- to get the area of use from.
null
will be returned.public Geometry transform(Geometry geo, java.lang.String sourceCRS) throws TransformationException, java.lang.IllegalArgumentException, UnknownCRSException
geo
- to be transformedsourceCRS
- the source CRS for the geometry. overwrites the CRS of the geometry.
TransformationException
- if the transformation between the source and target crs cannot be created.
java.lang.IllegalArgumentException
- if the coordinates system of the geometry is null
UnknownCRSException
- if the given CRS is not foundpublic Geometry transform(Geometry geo, CoordinateSystem sourceCRS) throws TransformationException, java.lang.IllegalArgumentException
geo
- to be transformedsourceCRS
- the source CRS for the geometry. overwrites the CRS of the geometry.
TransformationException
- if the transformation between the source and target crs cannot be created.
java.lang.IllegalArgumentException
- if the coordinates system of the geometry is null
public <T extends Geometry> T transform(T geom, CoordinateSystem sourceCRS, boolean testValidArea, java.util.List<Transformation> toBeUsedTransformations) throws java.lang.IllegalArgumentException, TransformationException
T
- geom
- to be transformedsourceCRS
- the source CRS for the geometry. overwrites the CRS of the geometry.testValidArea
- true if the geometry should be be checked of the valid area of the source crs.toBeUsedTransformations
-
java.lang.IllegalArgumentException
- if the coordinates system of the geometry is null
TransformationException
- if the transformation between the source and target crs cannot be created.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |