<div dir="ltr">Norman,<div><br></div><div>I believe you want to call SetGCPProjection() instead of SetProjection() when using GCPs instead of an affine transform. </div><div><br></div><div>Best regards,</div><div>Frank</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 1:23 PM, Norman Goldstein <span dir="ltr"><<a href="mailto:normvcr@telus.net" target="_blank">normvcr@telus.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have created a geotiff file using the "GTiff" driver, and have successfully set options for it to be a strips file with no compression.  Also, successfully called the functions<br>

<br>
dataset->SetMetadataItem( "AREA_OR_POINT",<br>
                                            "Point",<br>
                                             nullptr ) )<br>
<br>
and<br>
<br>
dataset->SetGCPs( 3,<br>
                               gcps,<br>
                               "Richmond" )<br>
<br>
Here is the listgeo dump:<br>
<br>
############# listgeo dump ##############<br>
Geotiff_Information:<br>
   Version: 1<br>
   Key_Revision: 1.0<br>
   Tagged_Information:<br>
      ModelTiepointTag (6,3):<br>
         0                249              0<br>
         0                0                0<br>
         399              249              0<br>
         1000             0                0<br>
         0                0                0<br>
         0                2000             0<br>
      End_Of_Tags.<br>
   Keyed_Information:<br>
      GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint<br>
      End_Of_Keys.<br>
   End_Of_Geotiff.<br>
<br>
<br>
Corner Coordinates:<br>
 ... unable to transform points between pixel/line and PCS space<br>
##############################<u></u>#######<br>
<br>
I also set the reference system using the following code:<br>
<br>
/////////////////////// c++ code ////////////////////////////<br>
  OGRSpatialReference oSRS;<br>
  oSRS.SetProjCS( "NoWhere" );<br>
  oSRS.SetWellKnownGeogCS( "WGS84" );<br>
  oSRS.SetEquirectangular( 0.0,        // Centre lat<br>
               0.0,        // Centre lon<br>
               0.0,   // False Easting<br>
               0.0 ); // False Northing<br>
<br>
  char* wkt = nullptr;<br>
<br>
  if( OGRERR_NONE != oSRS.exportToPrettyWkt( &wkt ) )<br>
  {<br>
     error...<br>
  }<br>
<br>
  if( CE_Failure == dataset->SetProjection( wkt ) )<br>
  {<br>
   error...<br>
  }<br>
//////////////////////////////<u></u>//////////////////////////////<u></u>///<br>
<br>
So, why is listgeo not able to transform points between pixel/line and PCS space?<br>
<br>
I am happy to upload a full working example if needed.<br>
<br>
Thank you.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush    | Geospatial Software Developer<br>
</div>