|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.crs.Transformer org.deegree.coverage.raster.RasterTransformer
public class RasterTransformer
This class transforms raster to a taget coordinate system .
Constructor Summary | |
---|---|
RasterTransformer(CoordinateSystem targetCRS)
Creates a new RasterTransformer with the given target CRS. |
|
RasterTransformer(String targetCRS)
Creates a new RasterTransformer with the given id as the target CRS. |
Method Summary | |
---|---|
void |
setBackgroundValue(byte[] backgroundValue)
Sets the background for the raster transformation. |
AbstractRaster |
transform(AbstractRaster sourceRaster,
Envelope dstEnvelope,
int dstWidth,
int dstHeight,
InterpolationType interpolationType)
Creates a transformed raster from a given source raster. |
AbstractRaster |
transform(AbstractRaster sourceRaster,
InterpolationType interpolationType)
Transform a raster to the target coordinate system. |
Methods inherited from class org.deegree.crs.Transformer |
---|
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 RasterTransformer(CoordinateSystem targetCRS) throws IllegalArgumentException
targetCRS
- to transform incoming coordinates to.
IllegalArgumentException
- if the given CoordinateSystem is null
public RasterTransformer(String targetCRS) throws IllegalArgumentException, UnknownCRSException
targetCRS
- an identifier to which all incoming coordinates shall be transformed.
UnknownCRSException
- if the given crs name could not be mapped to a valid (configured) crs.
IllegalArgumentException
- if the given parameter is null.Method Detail |
---|
public AbstractRaster transform(AbstractRaster sourceRaster, Envelope dstEnvelope, int dstWidth, int dstHeight, InterpolationType interpolationType) throws TransformationException, UnknownCRSException
This method transforms the requested envelope and returns a new raster with the requested size. The source raster can be larger than the requested envelope (like a large tiled raster), or smaller (the source raster nodata value will be used outside the source raster).
If the dstEnvelope does not contain a CRS or the CRS is the same as the
AbstractCoverage.getCoordinateSystem()
only interpolation will be applied. If the requested size is the
same as the number of rows/columns of the source raster, only the subset of the given raster will be returned,
without interpolation being applied.
sourceRaster
- the source rasterdstEnvelope
- the requested envelope (already in the target crs)dstWidth
- the requested raster sizedstHeight
- the requested raster sizeinterpolationType
- the type of the interpolation
TransformationException
UnknownCRSException
public AbstractRaster transform(AbstractRaster sourceRaster, InterpolationType interpolationType) throws IllegalArgumentException, TransformationException, UnknownCRSException
This method transforms the whole raster into the target CRS of this RasterTransformer. The size of the output raster will be calculated, so that the pixels keep the aspect ratio (i.e. keep square pixels).
If the coordinate system of the source raster is null
or equals the target crs, the source raster
will be returned unaltered.
sourceRaster
- the raster to be transformedinterpolationType
-
IllegalArgumentException
TransformationException
UnknownCRSException
public void setBackgroundValue(byte[] backgroundValue)
backgroundValue
-
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |