Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-21 Thread Nicolas Ribot
Hi Denis, In your example, I don't understand how the parts of your multipolygons can be adjacent. Are they valid ? Do you have a visual example ? Thank you Nicolas On 21 November 2013 07:32, Denis Rouzaud denis.rouz...@gmail.com wrote: Hello Rémi, I was hoping a simplest request without

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-21 Thread Nicolas Ribot
Thanks for the explanation. You could correct the multipolygons in one step, by using the st_buildArea function, that merges a linework of linestrings, preserving holes. To extract polygons boundaries as linestring, st_boundary() is very handy: The bad_multipg table contains invalid

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-21 Thread Denis Rouzaud
wow, thanks a lot! indeed, much much nicer! thanks again, Denis On 21. 11. 13 15:47, Nicolas Ribot wrote: Thanks for the explanation. You could correct the multipolygons in one step, by using the st_buildArea function, that merges a linework of linestrings, preserving holes. To extract

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-21 Thread Denis Rouzaud
Hi Nicolas, I edit my multi polygons in QGIS, and you're right the geometry becomes invalid if some parts have adjacent segments. In a simple case, I would have a multi polygons with 3 parts with 2 parts adjacent. http://imgur.com/zvxPFeR Although the geometry is invalid, my intention is

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-21 Thread Nicolas Ribot
You welcome. In fact, thanks to you: I used to extract multipolygons boundaries with such queries (!!): st_exteriorRing((st_dumpRings( (st_dump(geom)).geom )).geom) as geom until your use case makes me remember st_boundary function :) Nicolas On 21 November 2013 15:51,

[postgis-users] simplifying (homogenize) a polygon

2013-11-20 Thread Denis Rouzaud
Hi all, I am drawing some multipolygons in QGIS and sometimes, I have parts of them which are adjacent and I'd like to homogenize them to have less parts and no adjacent parts. I could do this with a quite complex method: 1. get the number of parts Z: SELECT ST_NumGeometries(geometry)

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-20 Thread Rémi Cura
From what I understand of your needs, Postigs topology was designed for this. Cheers, Rémi-C 2013/11/20 Denis Rouzaud denis.rouz...@gmail.com Hi all, I am drawing some multipolygons in QGIS and sometimes, I have parts of them which are adjacent and I'd like to homogenize them to have less

Re: [postgis-users] simplifying (homogenize) a polygon

2013-11-20 Thread Denis Rouzaud
Hello Rémi, I was hoping a simplest request without enabling topology but thanks anyway! Cheers, Denis On 20. 11. 13 18:26, Rémi Cura wrote: From what I understand of your needs, Postigs topology was designed for this. Cheers, Rémi-C 2013/11/20 Denis Rouzaud denis.rouz...@gmail.com