[gdal-dev] GDAL Warp working intermittetently

Christiaan Janssen cjanssen at iavo-rs.com
Mon May 26 15:39:11 EDT 2008


I apologize if this has already been answered previously, but I am trying to 
use the GDALWarp functionality and the process appears to be working only 
intermittently.  I am using the 1.5.0 build of GDAL.  The first time I try 
to use the warp functions when a project is opened, the results appear to be 
correct.  If I subsequently run the warp again (using the same data) I have 
been getting erroneous results.  For the image warping 
(oOperation.ChunkAndWarpImage) the output is an all black image.  For the 
point warping (GDALTPSTransform) the result is extremely high values.  In 
both cases, if I set a breakpoint in the debugger post-operation, and then 
set the active statement to the beginning of the setup function, the warping 
results are suddenly correct. 

Does anyone have experience with this type of issue with the GDALWarp 
library? 

The code that shows these issues is below.. 

Warp Image: 

psWarpOptions->pTransformerArg = GDALCreateTPSTransformer(tieIn->Count, 
tiePoints, 0); 
psWarpOptions->pfnTransformer = GDALTPSTransform; 
psWarpOptions->eResampleAlg = GRA_Bilinear; 
GDALWarpOperation oOperation; 
oOperation.Initialize( psWarpOptions ); 
CPLErr err = oOperation.ChunkAndWarpImage(0, 0, ihOut->ImageWidth, 
ihOut->ImageHeight); 



Warp Points: 

GDALTransformerFunc* gFunc = 
(GDALTransformerFunc*)GDALCreateTPSTransformer(tieIn->Count, tiePoints, 0); 
GDALTPSTransform(gFunc, 0, pWarp->Count, dX, dY, dZ, iSuc); 



Thanks for your help! 

Christiaan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080526/8150335f/attachment.html


More information about the gdal-dev mailing list