On Wed, Mar 6, 2013 at 11:01 AM, Jeremy Palmer <[email protected]> wrote:
> 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? > Jeremy, Hmm, I didn't know that geometry() existed. I always call GetGeometryRef() which is a bit ugly. I see geometry() called exactly once in the autotest suite so I would not be terribly certain it will continue to exist. > 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? > I do not see why this should go away. 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? > I now never call destroy but I do something set references to None to control object lifetime. No really solid answers but hopefully better than silence. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
