[gdal-dev] Rename and Reorder Layers?

Nik Sands nixanz at nixanz.com
Thu Jul 17 03:24:45 PDT 2014


Hi all,

I have two simple questions (not sure if the answers are as simple)...

1.  Is it possible to rename an OGR layer in place within a writeable data store without first creating a copy of the entire layer?

The only way I've found to do this is to use OGR_DS_CopyLayer() (or similar) and then delete the old layer which is fairly expensive as it has to copy all of the features as well.

2.  Is it possible to change the order of layers within a writeable OGR data store?  (Ie, change the ordering/indexing of layers as they would be retrieved with OGR_DS_GetLayer() ).

If these can be done, then I've missed it in the doco.  Could somebody please explain how to do this or otherwise what the best alternative would be?

Cheers,
Nik.



More information about the gdal-dev mailing list