<span style="font-weight: 700; font-size: 12px; display: block; margin-bottom: 20px;">[<a style="text-decoration: none;" href="#TopText">Attachment(s)</a> from Uffe Kousgaard included below]</span>
<p><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The attached sample has been generated using your data and MITAB. It
looks OK in my copy of MapInfo.<br>
<blockquote cite="mid:i17hj9+l3ha@eGro..." type="cite">
<pre wrap>Thanks for your answer!
In fact, I do not use MITAB to read a MIF/MID files and then generate a TAB/MAP files, but to generate direclty MIF/MID and TAB/MAP files from points by specifying outer and inner rings...
In the example, if I do not have a common point between the outer and the inner ring (just by moving a bit the common point in the inner ring), I do not have any problem with holes when generating TAB/MAP files! Apparently the problem occurs only when having a common point...
Any idea/suggestion for that?
--- In <a class="moz-txt-link-abbreviated" href="mailto:mitab@yaho...">mitab@yahoogroups.<wbr>com</a>, Daniel Morissette <a class="moz-txt-link-rfc2396E" href="mailto:dmorissette@..."><dmorissette@<wbr>...></a> wrote:
<pre wrap>developer.forsk wrote:
<pre wrap>- If I generate the TAB/MAP files and open them in MapInfo, the hole is drawn as a second contour and no hole is present !
- If I generate the MIF/MID files and import them in MapInfo, the hole is correctly drawn...
- When I export the MIF/MID from TAB/MAP created by MapInfo at import time, the files remain the same then the original I have imported first !
Does anyone know if this is a known problem in the MITAB library ? Or does anyone have a solution to avoid this problem ?
<pre wrap>Yes, this is a known limitation of the MITAB library. The MIF/MID format
does not contain information about outside/inside rings (i.e. polygons
vs holes in polygons)... it just contains a list of region parts with
their coordinates. OTOH, the TAB format does contain information about
outside/inside rings in a REGION which MapInfo sets after analyzing the
polygon topology when you digitize new objects.
When MITAB reads in a multipart region from a MIF file like the one you
have, it treats it as a multipolygon and does not try to distinguish
holes from free standing polygons. As a result, when the MIF input (read
as multipolygon) is written to TAB, MITAB does not tag any of the rings
as holes... and you get the result that you got in MapInfo.
We'd need to modify TABRegion::ReadGeom<wbr>etryFromMIFFile(<wbr>)
(mitab_feature_<wbr>mif.cpp) to use OGRGeometryFactory:<wbr>:organizePolygon<wbr>s()
instead of always constructing a multipolygon as it does now. We'll add
this to our wishlist, but if you have funding available for this please
contact me off-list and we'd be happy to make that enhancement to the
library for you.