<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2838" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>After beating my
head against the wall for a day or so, I started to explore other data
source types. ESRI shape files open correctly in MapInfo. I then noticed that
the MapInfo driver can be used to create MID/MIF files instead of tab files.
Using this option gave me correct results once imported into
MapInfo.</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>Is there anything
that I could be doing wrong to cause this type of behaviour? If not, then there
must be something wrong with the C API, since the exact same program was built
using C++ and it was able to create MapInfo tab files
correctly.</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial size=2>I have noticed some
strange behaviour with the Spatial Reference methods. If I create a single
Spatial Reference object (handle in the C API) and use it to create all the
layers in the same program as above, none of the layers are valid. If I create a
new Spatial Reference object for each new layer, I get the above behaviour
(where only the 2nd layer is valid). Since the OSR methods in the C API are not
properly documented that I could find, are there any known issues with this area
that might be causing these problems?</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2>Richard</FONT></SPAN></DIV>
<DIV><SPAN class=796293820-21032006><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>