[gdal-dev] geotiff projection not showing up

Norman Goldstein normvcr at telus.net
Wed Nov 6 13:23:10 PST 2013


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

dataset->SetMetadataItem( "AREA_OR_POINT",
                                             "Point",
                                              nullptr ) )

and

dataset->SetGCPs( 3,
                                gcps,
                                "Richmond" )

Here is the listgeo dump:

############# listgeo dump ##############
Geotiff_Information:
    Version: 1
    Key_Revision: 1.0
    Tagged_Information:
       ModelTiepointTag (6,3):
          0                249              0
          0                0                0
          399              249              0
          1000             0                0
          0                0                0
          0                2000             0
       End_Of_Tags.
    Keyed_Information:
       GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint
       End_Of_Keys.
    End_Of_Geotiff.


Corner Coordinates:
  ... unable to transform points between pixel/line and PCS space
#####################################

I also set the reference system using the following code:

/////////////////////// c++ code ////////////////////////////
   OGRSpatialReference oSRS;
   oSRS.SetProjCS( "NoWhere" );
   oSRS.SetWellKnownGeogCS( "WGS84" );
   oSRS.SetEquirectangular( 0.0,        // Centre lat
                0.0,        // Centre lon
                0.0,   // False Easting
                0.0 ); // False Northing

   char* wkt = nullptr;

   if( OGRERR_NONE != oSRS.exportToPrettyWkt( &wkt ) )
   {
      error...
   }

   if( CE_Failure == dataset->SetProjection( wkt ) )
   {
    error...
   }
///////////////////////////////////////////////////////////////

So, why is listgeo not able to transform points between pixel/line and 
PCS space?

I am happy to upload a full working example if needed.

Thank you.











-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4243 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131106/1c5d7399/attachment.bin>


More information about the gdal-dev mailing list