[postgis-users] Union, but need to exclude any void
Sufficool, Stanley
ssufficool at rov.sbcounty.gov
Sat Nov 1 07:58:26 PDT 2008
I've never had a problem with st_union including holes when it
shouldn't. Your query syntax is a bit odd though. Maybe try the
following:
SELECT ST_Union(the_geom) as the_geom
FROM territories
WHERE is_an_outer_territory = 1
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of Toby Rainthorpe
> Sent: Saturday, November 01, 2008 1:37 AM
> To: PostGIS Users Discussion
> Subject: [postgis-users] Union, but need to exclude any void
>
>
> I have a list of territories, say 9 represented by a tic, tac, toe
> board (3 x 3 grid ). A query selects all the outer perimeter (8
> territories), but omits the central block. If i were then to union
> this group the resulting polygon would fill, or include this central
> block, even though I have not exclusively said that that
> territory has
> been selected.
>
> Is there a way of doing a union, or another method on a set of
> polygons that will result in a polygon being created, but allow for
> the void not to be included.
>
> Thanks for your help,
>
> Toby
>
>
> SELECT
> GeomUnion(geom) as the_geom,
> FROM (
> SELECT (dump(the_geom)).geom FROM territories WHERE
> is_an_outer_territory = 1
> )
> _______________________________________________
> postgis-users mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list