<html><div style='background-color:'><DIV class=RTE>Hello Frank,</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp;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>&nbsp;</DIV>
<DIV class=RTE>OGRSpatialReference oSRS;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; //oSRS.SetUTM(17, TRUE);</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; //oSRS.SetWellKnownGeogCS("WGS84");<BR>&nbsp;oSRS.importFromProj4("+proj=longlat");</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; oSRS.exportToWkt( &amp;pszDstWKT );</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; // Create a transformer that maps from source pixel/line coordinates<BR>&nbsp;&nbsp;&nbsp; // to destination georeferenced coordinates (not destination <BR>&nbsp;&nbsp;&nbsp; // pixel line).&nbsp; We do that by omitting the destination dataset<BR>&nbsp;&nbsp;&nbsp; // handle (setting it to NULL). </DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; void *hTransformArg;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; hTransformArg = GDALCreateGenImgProjTransformer( hSrcDS, pszSrcWKT, NULL, pszDstWKT, FALSE, 0, 1 );<BR>&nbsp;&nbsp;&nbsp; CPLAssert( hTransformArg != NULL );</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; // Get approximate output georeferenced bounds and resolution for file. </DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; double adfDstGeoTransform[6];<BR>&nbsp;&nbsp;&nbsp; int nPixels = 0, nLines = 0;<BR>&nbsp;&nbsp;&nbsp; CPLErr eErr;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; eErr = GDALSuggestedWarpOutput( hSrcDS, GDALGenImgProjTransform, hTransformArg, adfDstGeoTransform, &amp;nPixels, &amp;nLines );<BR>&nbsp;&nbsp;&nbsp; CPLAssert( eErr == CE_None );</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; GDALDestroyGenImgProjTransformer( hTransformArg );</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp; // Create the output file.<BR>&nbsp;char *apszOptions[] = {"INTERLEAVE=PIXEL", NULL};<BR>&nbsp;hDstDS = GDALCreate(hDriver, fileNameOut, nPixels, nLines, GDALGetRasterCount(hSrcDS), eDT, apszOptions);</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks ahead.</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ilya.</DIV></div></html>