|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.model.crs.GeoTransformer
public class GeoTransformer
class for transforming deegree geometries to new coordinate reference systems.
------------------------------------------------------------
Constructor Summary | |
---|---|
GeoTransformer(CoordinateSystem targetCRS)
Creates a new GeoTransformer object. |
|
GeoTransformer(CoordinateSystem targetCRS)
Creates a new GeoTransformer object. |
|
GeoTransformer(java.lang.String targetCRS)
Creates a new GeoTransformer object, with the given id as the target CRS. |
|
GeoTransformer(Transformation definedTransformation)
|
Method Summary | |
---|---|
GridCoverage |
transform(AbstractGridCoverage coverage,
Envelope targetBBOX,
int dstWidth,
int dstHeight,
int refPointsGridSize,
int degree,
javax.media.jai.Interpolation interpolation)
transforms a GridCoverage into another coordinate reference system. |
GridCoverage |
transform(AbstractGridCoverage coverage,
int refPointsGridSize,
int degree,
javax.media.jai.Interpolation interpolation)
Deprecated. |
java.awt.image.BufferedImage |
transform(java.awt.image.BufferedImage img,
Envelope sourceBBOX,
Envelope targetBBOX,
int dstWidth,
int dstHeight,
int refPointsGridSize,
int degree,
javax.media.jai.Interpolation interpolation)
transforms an image into another coordinate reference system. |
java.util.List<javax.vecmath.Point3d> |
transform(CoordinateSystem sourceCRS,
java.util.List<javax.vecmath.Point3d> points)
|
Envelope |
transform(Envelope envelope,
CoordinateSystem sourceCRS)
Transforms a Envelope to the target crs of the GeoTransformer instance |
Envelope |
transform(Envelope envelope,
CoordinateSystem sourceCRS,
boolean regardDistortion)
Transforms a Envelope to the target crs of the GeoTransformer instance
This transformation takes rotation and distortion into account when regardDistortion is true. |
Envelope |
transform(Envelope envelope,
java.lang.String sourceCRS)
Transforms a Envelope to the target crs of the GeoTransformer instance |
Envelope |
transform(Envelope envelope,
java.lang.String sourceCRS,
boolean regardDistortion)
Transforms a Envelope to the target crs of the GeoTransformer instance
This transformation takes rotation and distortion into account when regardDistortion is true. |
Feature |
transform(Feature feature)
transforms all geometries contained within the passed Feature into the target CRS of a GeoTransformer
instance. |
FeatureCollection |
transform(FeatureCollection fc)
transforms all geometries contained within the passed FeatureCollection into the target CRS of a
GeoTransformer instance. |
Geometry |
transform(Geometry geo)
transforms the coordinates of a deegree geometry to the target coordinate reference system. |
Geometry |
transform(Geometry geo,
CoordinateSystem sourceCRS)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoTransformer(CoordinateSystem targetCRS) throws java.security.InvalidParameterException
targetCRS
-
java.security.InvalidParameterException
- if the given parameter is null.public GeoTransformer(CoordinateSystem targetCRS)
targetCRS
-
java.security.InvalidParameterException
- if the given parameter is null.public GeoTransformer(Transformation definedTransformation)
definedTransformation
- to use instead of the CRSFactory.public GeoTransformer(java.lang.String targetCRS) throws UnknownCRSException, java.security.InvalidParameterException
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.security.InvalidParameterException
- if the given parameter is null.Method Detail |
---|
public GridCoverage transform(AbstractGridCoverage coverage, Envelope targetBBOX, int dstWidth, int dstHeight, int refPointsGridSize, int degree, javax.media.jai.Interpolation interpolation) throws CRSTransformationException
coverage
- grid coverage to definedTransformationtargetBBOX
- envelope for the target coveragedstWidth
- width of the output coverage in pixeldstHeight
- height of the output coverage in pixelrefPointsGridSize
- size of the grid used to calculate polynoms coefficients. E.g. 2 -≶ 4 points, 3 -≶ 9 points ...degree
- The degree of the polynomial is supplied as an argument.interpolation
- interpolation method for warping the passed coverage. Can be null
. In this case 'Nearest
Neighbor' will be used as default
CRSTransformationException
- if the gridCoverage could not be created or the transformation failedpublic java.awt.image.BufferedImage transform(java.awt.image.BufferedImage img, Envelope sourceBBOX, Envelope targetBBOX, int dstWidth, int dstHeight, int refPointsGridSize, int degree, javax.media.jai.Interpolation interpolation) throws CRSTransformationException
img
- the image to definedTransformationsourceBBOX
- envelope of the source imagetargetBBOX
- envelope for the target imagedstWidth
- width of the output image in pixeldstHeight
- height of the output image in pixelrefPointsGridSize
- size of the grid used to calculate polynoms coefficients. E.g. 2 -≶ 4 points, 3 -≶ 9 points ...degree
- The degree of the polynomial is supplied as an argument.interpolation
- interpolation method for warping the passed image. Can be null
. In this case 'Nearest
Neighbor' will be used as default
CRSTransformationException
- if the image could not be created or the transformation failed@Deprecated public GridCoverage transform(AbstractGridCoverage coverage, int refPointsGridSize, int degree, javax.media.jai.Interpolation interpolation) throws CRSTransformationException
coverage
- grid coverage to definedTransformationrefPointsGridSize
- size of the grid used to calculate polynoms coefficients. E.g. 2 -≶ 4 points, 3 -≶ 9 points ...degree
- The degree of the polynomial is supplied as an argument.interpolation
- interpolation method for warping the passed coverage. Can be null
. In this case 'Nearest
Neighbor' will be used as default
CRSTransformationException
- if the gridCoverage could not be created or the transformation failedpublic Envelope transform(Envelope envelope, CoordinateSystem sourceCRS) throws CRSTransformationException
Envelope
to the target crs of the GeoTransformer
instance
envelope
- to definedTransformationsourceCRS
- CRS of the envelope
CRSTransformationException
public Envelope transform(Envelope envelope, java.lang.String sourceCRS, boolean regardDistortion) throws CRSTransformationException, UnknownCRSException
Envelope
to the target crs of the GeoTransformer
instance
This transformation takes rotation and distortion into account when regardDistortion is true. Otherwise the
transformed envelope may not contain the whole input envelope.
envelope
- to definedTransformationsourceCRS
- CRS of the enveloperegardDistortion
-
CRSTransformationException
UnknownCRSException
public Envelope transform(Envelope envelope, CoordinateSystem sourceCRS, boolean regardDistortion) throws CRSTransformationException
Envelope
to the target crs of the GeoTransformer
instance
This transformation takes rotation and distortion into account when regardDistortion is true. Otherwise the
transformed envelope may not contain the whole input envelope.
envelope
- to definedTransformationsourceCRS
- CRS of the enveloperegardDistortion
-
CRSTransformationException
public java.util.List<javax.vecmath.Point3d> transform(CoordinateSystem sourceCRS, java.util.List<javax.vecmath.Point3d> points) throws CRSTransformationException, java.lang.IllegalArgumentException
sourceCRS
- in which the given points are referenced.points
- to definedTransformation.
null
CRSTransformationException
- if no transformation could be created for the given source and target crs.
java.lang.IllegalArgumentException
- if the sourceCRS is null
public Envelope transform(Envelope envelope, java.lang.String sourceCRS) throws CRSTransformationException, UnknownCRSException
Envelope
to the target crs of the GeoTransformer
instance
envelope
- to definedTransformationsourceCRS
- CRS of the envelope
CRSTransformationException
- if the transformation did not succeed.
UnknownCRSException
- if the given string is unknown to the CRSProviderpublic Feature transform(Feature feature) throws CRSTransformationException
Feature
into the target CRS of a GeoTransformer
instance. If a geometry was transformed the Feature.setEnvelopesUpdated()
method will be called.
feature
-
CRSTransformationException
public FeatureCollection transform(FeatureCollection fc) throws CRSTransformationException
FeatureCollection
into the target CRS of a
GeoTransformer instance.
fc
- the collection to definedTransformation
CRSTransformationException
- if the transformation cannot be created or processed.public Geometry transform(Geometry geo) throws CRSTransformationException, java.lang.IllegalArgumentException
geo
- to be transformed
CRSTransformationException
- 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 Geometry transform(Geometry geo, CoordinateSystem sourceCRS) throws CRSTransformationException
geo
- sourceCRS
-
CRSTransformationException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org