[gdal-dev] Re: Python bindings: How to merge two geometries

Even Rouault even.rouault at mines-paris.org
Wed Sep 7 14:43:21 EDT 2011


Le mercredi 07 septembre 2011 19:36:54, vasile a écrit :
> Frank Warmerdam wrote:
> > The fix then is to clone it when you want it to live for a while.
> > Also, I believe that the Union method returns the unioned
> > geometry - it does not modify the geometry on which it is invoked.
> 
> That did the trick, it works just fine, thanks !
> 
> Frank Warmerdam wrote:
> > Lastly, please try to avoid assuming feature id's are consecutive.
> 
> > So an improved script might look a bit like:
> Acknowledged, it's much nicer now.

You will find other tips&tricks related to life-time management in
http://trac.osgeo.org/gdal/wiki/PythonGotchas

You're welcome to expand it with your use case.

> 
> Thanks again,
> Vasile
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Python-bindings-How-to-merge-two-ge
> ometries-tp6768614p6768777.html Sent from the GDAL - Dev mailing list
> archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list