<html><div style='background-color:'><DIV class=RTE>Hello Frank,</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> Thanks for clearing this up. I am not sure how to project from UTM NAD83 to Lat/Long WGS84. In your example application, namely gdalwrap, there is a option "+proj=latlong" which would be specified for the -t_srs in order to go from whatever the projection of the source into lat and long, I tried that and it works, but I do not know how to set this up inside my code, I tried using importFromProj4("+proj=longlat"), which should automatically set the lat/long option into the srs object I am about to assign to the destination image, like this:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>OGRSpatialReference oSRS;</DIV>
<DIV class=RTE> //oSRS.SetUTM(17, TRUE);</DIV>
<DIV class=RTE> //oSRS.SetWellKnownGeogCS("WGS84");<BR> oSRS.importFromProj4("+proj=longlat");</DIV>
<DIV class=RTE> oSRS.exportToWkt( &pszDstWKT );</DIV>
<DIV class=RTE> // Create a transformer that maps from source pixel/line coordinates<BR> // to destination georeferenced coordinates (not destination <BR> // pixel line). We do that by omitting the destination dataset<BR> // handle (setting it to NULL). </DIV>
<DIV class=RTE> void *hTransformArg;</DIV>
<DIV class=RTE> hTransformArg = GDALCreateGenImgProjTransformer( hSrcDS, pszSrcWKT, NULL, pszDstWKT, FALSE, 0, 1 );<BR> CPLAssert( hTransformArg != NULL );</DIV>
<DIV class=RTE> // Get approximate output georeferenced bounds and resolution for file. </DIV>
<DIV class=RTE> double adfDstGeoTransform[6];<BR> int nPixels = 0, nLines = 0;<BR> CPLErr eErr;</DIV>
<DIV class=RTE> eErr = GDALSuggestedWarpOutput( hSrcDS, GDALGenImgProjTransform, hTransformArg, adfDstGeoTransform, &nPixels, &nLines );<BR> CPLAssert( eErr == CE_None );</DIV>
<DIV class=RTE> GDALDestroyGenImgProjTransformer( hTransformArg );</DIV>
<DIV class=RTE> // Create the output file.<BR> char *apszOptions[] = {"INTERLEAVE=PIXEL", NULL};<BR> hDstDS = GDALCreate(hDriver, fileNameOut, nPixels, nLines, GDALGetRasterCount(hSrcDS), eDT, apszOptions);</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> Thanks ahead.</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE> Ilya.</DIV></div></html>