[gdal-dev] Re: Output MapInfo File with CoordSys Information

Frank Warmerdam warmerdam at pobox.com
Wed Mar 24 14:23:45 EDT 2010


Reinaldo Escada Chohfi wrote:
> Hello Frank and List,
> 
> We waited for the release of GDAL 1.7.0 to see if we could output MapInfo
> Fiels (.tab or .mif/mid) with SRS information.
> 
> We still can not output .tab or .mif/mid files with SRS information.
> 
> Could you please check the test code below to see what's missing or wrong?
...
> void main()
> {
>  OGRSpatialReference oSRS;
> // oSRS.SetWellKnownGeogCS( "EPSG:4326" );
>  oSRS.importFromMICoordSys( "CoordSys Earth Projection 1, 104" );
> 
...
>     OGRLayer *poLayer;
>     poLayer = poDS->CreateLayer( "test01", NULL, wkbPoint, NULL );

Reinaldo,

I don't see any sign that you are doing anything with the spatial
reference.  You need to pass the OGRSpatialReference* into CreateLayer()
as the second argument.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list