[Gdal-dev] GDALWarpOperation::WarpRegion
Frank Warmerdam
warmerdam at pobox.com
Thu Sep 29 20:06:09 EDT 2005
On 9/29/05, Sean Forde <sforde at lizardtech.com> wrote:
>
> The prototype for this function is:
>
> CPLErr WarpRegion(int nDstXOff, int nDstYOff, int nDstXSize, int
> nDstYSize, int nSrcXOff=0, int nSrcYOff=0, int
> nSrcXSize=0, int nSrcYSize=0)
>
> Are all these parameters to this function in pixel space? That is, if I
> have spatial coordinates to start with, must I convert them to pixel
> space in order to call this function correctly?
Sean,
The "Dst" values are in pixel space on the destination image, and
the "Src" values are in source image pixel/line coordinates.
Note that normally you would not call WarpRegion(), instead
using ChunkAndWarpImage() which will split the overall region
into more appropriate sized sub-chunks.
If you choose to manage the GDALWarpOperation directly, and
don't want to operate on the whole destination image you will need
to select subwindows in pixel coordinates.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list