I have tried everything I could find (using C++) to create a new .prj file for an output point shapefile using OGR. While I get no compilation or execution errors and ArcMap accepts the file as a point file, ArcMap still claims that my output shapefile has no spatial reference:
Data Type: Shapefile Feature Class
Shapefile: G:\GIS\Working\FIrani\Ubuntu\0_From_Ubuntu\Seeds001.shp
Geometry Type: Point
Coordinates have Z values: No
Coordinates have measures: No
Coordinate System: <Undefined>
How do I get OGR to actually apply my ACEA specified coordinate information to its output shapefile? Do I actually have to delete the current .prj and create and write out a new .prj file myself?
My current (kitchen sink) approach is as follows:
/*
Define projection for output seed file.
--------------------------------------- */
char *pszWkt = NULL;
oSRS.SetProjection("ACEA");
oSRS.SetProjCS("ACEA");
oSRS.SetWellKnownGeogCS("ACEA");
oSRS.SetACEA(29.5, 45.5, 23.0, -96.0, 0.0, 0.0);
oSRS.morphToESRI();
oSRS.importFromWkt( &pszWkt );
pioSeedLayer = pioSeedDS->CreateLayer( pszSeedsfn, &oSRS, wkbPoint, NULL );
// Ouput projection via oSRS.
if( pioSeedLayer == NULL )
{
printf( "Layer creation for seeds failed.\n" );
exit( 1 );
}