Hi Lance,

I suspect the most probable cause for the transform failure is a non-
invertible geotransform matrix in CSTrans (i.e., due to incorrectly set 
scale values).

What are m_srcGT / m_dstGT set to (the 6 actual values, not
the code fragment used to set them)? m_srcGT should be
set to the source file geotransform,  m_dstGT to identity.

You should also add some debug code to see the source and destination
coordinates calculated in CSTrans::STransform, especially if they are
mapped to infinity or all onto the same x/y-coordinate. 

Also, failure of GDALApproxTransform / GDALReprojectionTransform is
not corretly passed on in STransform, so to make sure that it does not 
trip up GDALSuggestedWarpOutput, you should return 0 if GDALApproxTransform or
GDALReprojectionTransform fail (return 0).

cheers,

        Manuel
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to