Hi Brian,
I have squares.  A lot of squares.  Thousands of squares.  I would
love
to combine them into one or more larger polygons.  But, they must
valid
polygons, non-reentrant.  For example. if you have a 3x3 grid of
squares,
ABC
RST
XYZ
and I want to combine all but the center, I would need either 2
polygons
(something like ABC and RXYZT), or one polygon with an inner ring.
Assuming there is a table 'squares' containing a geometry type 'the_geom', this 
one produces a polygon having an inner ring:

SELECT
ST_Difference(ST_Union(the_geom), (SELECT the_geom FROM squares WHERE id='S'))
FROM squares

Best Regards,
Andreas

Does this return a multipolyon or a single polygon? I didn't state this originally, but I have disjointed squares. So if you look at a grid:
ABCDEF
OPQRST
UVWXYZ
I might have ABCEFOQUVW
ABC EF
O Q
UVW
So I would want one polygon with ABCQWVU and one with EF

- Brian
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to