[gdal-dev] Shapefiles and z dimensions

Nyall Dawson nyall.dawson at gmail.com
Sat Dec 9 15:22:21 PST 2017


On 10 December 2017 at 00:58, Even Rouault <even.rouault at spatialys.com> wrote:
> As underlined by Alvaro and Ari, the format doesn't distinguish PointZ and
> PointZM in the header.
>
> GDAL has a logic to look by default at the first geometry
> (ADJUST_GEOM_TYPE=FIRST_SHAPE open option) and see if it has a non nodata M
> value, if so it exposes PointZM, otherwise PointZ
>
> But for an empty file, there's no way to really know the intent.

Ok - thanks for the confirmation. I don't see this as a particular
important issue, given that requesting a layer with Z does result in a
layer which supports that, so I don't think there's any need to work
around this in GDAL.

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?

Nyall


More information about the gdal-dev mailing list