[postgis-users] Question on INTERSECTION functionality...
Aaron Racicot
aaronr at ecotrust.org
Tue Mar 22 09:36:11 PST 2005
Thanks, I will give this a try and play with the filter. I will post
back to the group when I have some results!
Aaron
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Carl
Anderson
Sent: Monday, March 21, 2005 7:25 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Question on INTERSECTION functionality...
Aaron Racicot wrote:
<snip>
> The problem I am having is that while all of my initial polygons are
> MULTIPOLYGON type, the intersection operator returns
> GEOMETRYCOLLECTION for some of the intersections. I read over the
> simple features spec and it seems to imply that some intersections
> will generate shapes that can not be represented anymore as polygons,
> but instead polygons and other types like lines. Is this true?
>
yes difference, symdifference, and intersection may all return geometry
types of other dimensions or
collections of various geometry types.
> If it is, I have a problem in that I can not do the intersection
> operator on GEOMETRYCOLLECTION and therefore can not continue my
> process of breaking down overlapping polygons. Is there any solution
> to this problem? I was hoping that you could do some type of "cast"
> from GEOMETRYCOLLECTION to another type, say MULTIPOLYGON, and get a
> "best" approximation by dropping other geometry types out of the
> collection and just returning the resulting polygons.
>
As long as you desire to ignore the geometries of other dimensions
(
point and multipoint are geometries of dimension 0
linestring and multilinestring are geometries of dimension 1
polygon and multipolygon are geometries of dimension 2
)
you can install and use the attached function to filter geometries.
This
C.
More information about the postgis-users
mailing list