[Gdal-dev] invalid/no projection information in output TAB format files

Frank Warmerdam warmerdam at pobox.com
Mon May 29 13:50:58 EDT 2006


Peter.Rushforth at statcan.ca wrote:
> Hello list,
> 
> I am using ogr2ogr to convert gml files to mapinfo TAB format, using
> the following command option and syntax:
> 
> ogr2ogr -a_srs WGS84 -f "MapInfo File" test.map test.gml
> 
> The test.map and associated files are created, but the projection about
> the layer is not set correctly and Mapinfo 7 crashes when exiting if the file
> is not closed first, a concern.
> 
> When I go through MIF format, and then to TAB, the projection info is correctly
> set in the TAB file and no problems with Mapinfo are encountered:
> 
> ogr2ogr -a_srs WGS84 -f "MapInfo File" -dsco FORMAT=MIF temp.mif test.gml
> ogr2ogr -f "MapInfo File" test.tab temp.mif
> 
> So first converting to mid/mif, then to tab is an option, but is
> there some way to skip that step?

Peter,

As Richard suggested, you might want to update to the latest code, perhaps
a nightly snapshot of GDAL, as there have been a few mapinfo tab related
fixes.

If that still demonstrates the problem, then could you provide your
test.gml file?

Generally speaking there is a lot of header information not written out
by OGR till the .tab file is closed, and I don't forsee any change to that.
So opening an "in writing" file is just not going to work reliably.

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    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list