[gdal-dev] Ignoring KML/KMZ id field
Even Rouault
even.rouault at spatialys.com
Wed Oct 22 02:30:14 PDT 2025
> If you're in code, you can skip fields using SetIgnoredFields():
>
> https://gdal.org/en/stable/doxygen/classOGRLayer.html#aaf3f2e7ee476337082cea814226be11a
>
SetIgnoredFields() doesn't change the schema. It just tells the driver
that it doesn't need to fill the fields.
>
> For a tool like ogr2ogr, you could try -unsetFid, or build a -fieldmap
> if it isn't too messy.
>
-unsetFid will not work here because that's a regular field
The following should do: -sql "SELECT * EXCLUDE (id) FROM layer_name"
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251022/fb79f64e/attachment.htm>
More information about the gdal-dev
mailing list