Le 02/10/2023 à 17:23, Abel Pau a écrit :

Thanks Even,

that it’s not so bad. I can “wait” until ICreateFeature and if it’s the first feature create the number of fields it has.

But, then, what happens with other fields that can appear after in next features? I might ignore them, but... it’s not a good thing.

Just look at existing drivers, like the JML one I pointed. They will error out when attempting to call CreateField() once a feature has been written, and they will stop advertizing the OLCCreateField capability as well.

Can they appear later or not? I haven’t understood it at complete.

Calling CreateField() at any time is a possibility of the OGR API. That doesn't mean that all drivers have to support it. Most writers will generally create all needed fields before writing features, if they can, to be compatible with as many output drivers as possible.


--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to