[Gdal-dev] GDALWarpOptions - Destination dataset issue

Guillaume Bourel gbourel at ago.fr
Wed Nov 22 09:11:13 EST 2006


I am currently trying to warp GeoTiff data with any geographic 
coordinate system into WGS84 with Mercator projection, within a C++ project.

I do believe this should be done by using GDALWarpRegionToBuffer, which 
needs a GDALWarpOperation, which, itself, needs a GDALWarpOptions.

GDALWarpOptions reference explains :

    GDALDatasetH GDALWarpOptions::hDstDS
    Destination image dataset - may be NULL if only using

but GDALWarpOperation::Initialize or GDALCreateWarpOperation both 
returns CE_Failure, if hDstDS is set to NULL
(behavior due to ValidateOptions() call, which checks hDstDS isn't 
NULL). Therefore, creation of the GDALWarpOperation fails.
And, as I don't have any destination file, my destination dataset is NULL.

I don't understand what I'm doing wrong,
if someone could explain me the way I should follow to successfully 
create a GDALWarpOperation in order to use it with GDALWarpRegionToBuffer.

Best regards,

Tel. : +33 (0)2 98 05 43 21
Technopôle Brest Iroise
Site du Vernis - CS 23866
29238 Brest Cedex 3 - France
Tel. : +33 (0)2 98 05 43 21
Fax. : +33 (0)2 98 05 20 34
e-mail: atlantide-brest at ago.fr

More information about the Gdal-dev mailing list