[gdal-dev] Ignoring KML/KMZ id field

Peter Townsend peter.townsend at maplarge.com
Fri Oct 24 10:28:24 PDT 2025


"SELECT * EXCLUDE (id) FROM layer_name"

That worked, thanks!

On Wed, Oct 22, 2025 at 4:30 AM Even Rouault via gdal-dev <
gdal-dev at lists.osgeo.org> wrote:

>
> 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.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Peter Townsend
Senior Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251024/a90da246/attachment-0001.htm>


More information about the gdal-dev mailing list