[Gdal-dev] GetSpatialRef() returns a NULL pointer.

Tyler Mitchell tylermitchell at shaw.ca
Mon Aug 2 11:24:57 EDT 2004


> 		OGRSpatialReference *pOGRSR = pOGRLayer->GetSpatialRef(); // <- This
> function returns NULL printf("#######pOGRSR=%p######\n", pOGRSR);		    //
> <- Write pOGRSR=(nil) }

Michele, do you have a projection file with your shapefile (i.e. 
airports.prj)?  SpatialRef is the spatial reference system point.  Is it the 
projection info itself you are looking for?  It didn't sound like it from 
your email.  I think you want to get at the geometries, not a spatialref.

Tyler



More information about the Gdal-dev mailing list