[Community] strange behaviour for union function

Sean Gillies sean.gillies at gmail.com
Wed Jun 9 22:22:47 EEST 2010


Try shapely.ops.cascaded_union

  >>> q = cascaded_union(MultiPolygon([p2, p3, p4, p5]))
  >>> q
  <shapely.geometry.polygon.Polygon object at 0x16584fb0>

I used descartes.patch.PolygonPatch to render ``q`` with matplotlib
and see the thin donut shape you're looking for. I haven't tried
Polygon.union yet, but you should almost always be using
cascaded_union instead.

Cheers,

On Wed, Jun 9, 2010 at 2:38 PM, Emmanuel Lambert
<emmanuel.lambert at intec.ugent.be> wrote:
> Hello Sean
>
> Attached is an archive with the WKT-files.
>
> thanks in advance for looking into this.
>
> Emmanuel
>

-- 
Sean


More information about the Community mailing list