[postgis-users] Polygonize

Martin Davis mbdavis at refractions.net
Fri Jun 13 09:08:33 PDT 2008


Is the noded_lines.sql dataset captured before or after you have grouped 
them to make them unique?  There's lots of coincident segments in there 
now, which will make the polygonize fail. 

I'm wondering whether the GROUP BY is working to provide unique line 
segments (regardless of orientation).

I'm a little suspicious of that snaptogrid as well...  is it actually 
making the endpoints coincident?  I seem to recall it has some 
subtleties in its semantics.


Dustin Sampson wrote:
> Hey Everyone,
>   I'm building a "clean" type function that cleans up overlapping 
> polygons within a table (without using the ST_Union function) but am 
> running into a few snags.
> Basically what I'm doing is
>    1) Converting polygons -> lines
>    2) Converting lines -> points
>    2) Add intersecting nodes where lines cross.
>    3) Build lines from points & nodes
>    4) Polygonize new lines.
> I can get to stage 3 (so far reliabily) but at stage 4 it doesn't seem 
> to be building polygons consistently in my testing.  I've attached my 
> original polygon table (testset.sql), my noded lines (noded_lines.sql) 
> and my function which is in plpython  (tnrg_clean.sql).
> Does anyone know what is required for the polygonize function, am I 
> missing some stage to prep the line work before converting to polygons.
> Any help would be appreciated.
> Thanks for the help,
> Dustin Sampson
> ------------------------------------------------------------------------
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

More information about the postgis-users mailing list