[Gdal-dev] MapInfo mixing geometry types in a layer

Daniel Morissette morissette at dmsolutions.ca
Thu Nov 28 17:13:16 EST 2002


Frank Warmerdam wrote:
> 
>  I believe the problem is that the MITAB
> code determines if a specific geometry type can be used by checking the
> tab file header.  In cases where the "number of lines" field is the only
> non-zero one, it assumes the layer holds only lines.  

...

> 
> I am a little surprised there are multi line strings in Mapinfo, 
>

Frank, Ben,

Just to shed some light on this...

MapInfo has three linear types:
 - LINE: 
     2 points line, returned as a LineString

 - PLINE: 
     polyline, returned as a LineString

 - PLINE MULTIPLE: 
     multiple disjoint polyline segments, will be returned as a
     MultiLineString

As Frank mentioned, OGR checks the 'numlines' field in the file header
to try to guess the geometry type, but this is really just the total
number of linear features in the file (the sum of the three types above)
so there is no way to tell whether there is a mix of LineString and
MultiLineString in the file without scanning the whole file.

Daniel
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the Gdal-dev mailing list