[Gdal-dev] Problem creating MapInfo tab files using C# (via the C API)

Frank Warmerdam warmerdam at pobox.com
Tue Mar 21 17:41:20 EST 2006


Richard Matsunaga wrote:
> Hi all,
>  
> I've been building a C# wrapper for OGR (following on the good work on a 
> GDAL wrapper by Sy Perkins) and am very new to OGR development.
>  
> Everything was going swimmingly until I tried to write to a MapInfo tab 
> file. Basically, I am trying to write multiple layers, each with some 
> number of polygon objects. All my fields are being written correctly. 
> But for some reason, only the 2nd layer that I create is good. If I 
> create only one layer, it is corrupt. All layers other than the 2nd 
> layer are corrupt.
>  
> How do I define corrupt? The files open in MapInfo, but the polygons 
> have invalid coordinates and certain actions within MapInfo cause 
> crashes (such as Export). The fields are all correct. If you check the 
> projection in table maintenance, MapInfo cannot find the projection for 
> all layers except the 2nd.

Richard,

This might be worth taking up on the mitab list - this issue sounds vaguely
familiar.  I wonder if it might already have been fixed. Are you using
GDAL CVS?

If you can boil down a small C program that demonstrates the problem that
would be helpful.  I don't have any mapinfo software myself though, so it
is hard for me to test files that cause it problems.

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