Norman, My apologies. The GCP projection is actually supposed to be passed as the third value in the SetGCPs call - where you have passed the string "Richmond". Instead pass the whole WKT strings for the coordinate system.
Best regards, Frank On Wed, Nov 6, 2013 at 4:00 PM, Norman Goldstein <[email protected]> wrote: > Frank, > > I am using GDAL > Version : 1.9.2 > > so maybe that is why I do not see the method SetGCPProjection(). > > I think you have convinced me, though, to calculate the 6 coefficients > directly, > and then call SetGeoTransform(). Will let you guys know how this works out > for me. > > Thank you, > Norm > > > > On 11/06/2013 01:51 PM, Frank Warmerdam wrote: > > Norman, > > I believe you want to call SetGCPProjection() instead of SetProjection() > when using GCPs instead of an affine transform. > > Best regards, > Frank > > > > On Wed, Nov 6, 2013 at 1:23 PM, Norman Goldstein <[email protected]>wrote: > >> 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. >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> gdal-dev mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/gdal-dev >> > > > > -- > > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, > [email protected] > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Software Developer > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
