[gdal-dev] Python API

Jeremy Palmer JPalmer at linz.govt.nz
Wed Mar 6 11:01:35 PST 2013

Hi All,

I've got a few questions about the support and future of some method calls within the OGR Python API.

1/ What is preferred way to method to access geometries from features? is it feature.geometry() or feature.GetGeometryRef()? "geometry()" seems funny as it's not well documented and is not declared using camel case (or at least starting with a capital letter). Is this going to be well supported in the future?

2/ Is accessing feature field values via the pythonic attribute interface (i.e feature['myatt'] or feature['myatt'] = 1) the preferred way? Also is this API going to be well supported in the future?

3/ Following on from discussion about destroy() from geo.org/gdal/wiki/PythonGotchas, can it be confirmed if you need to call destroy at 'all' on OGR objects with GDAL/OGR 1.9? Can some examples be given?


This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.

More information about the gdal-dev mailing list