[gdal-dev] Shapefiles and z dimensions

Even Rouault even.rouault at spatialys.com
Sat Dec 9 15:49:22 PST 2017


> 
> On a related note... is there any tricks in the GDAL API which can be
> used to "force" a geometry type for created tab files? E.g. if I
> create a tab file, specifying Point geometry type, the initially empty
> result layer has no fixed geometry type. This makes it unusable in
> QGIS, since QGIS currently demands that layers have a single, fixed
> geometry type. Is there any hack to avoid this and "lock in" a
> geometry type when creating tab files?

MapInfo mif/tab are absolutely geometrically untyped. You can throw any type of 
geometry in a layer.
Perhaps a possibility for QGIS would be to pass an option to the QGIS OGR provider forcing 
the layer geometry type when it has just created a layer and wants to open it (that would 
assume the user would at least create one entity right away). Or create some side car file 
with that information.
Another possibility would be to use some spare bytes at the end of the .map header to add 
that info (and checking that mapinfo properly ignores it)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171210/8b292ced/attachment.html>


More information about the gdal-dev mailing list