[postgis-users] multipolygon polygon test intersects

Nicolas Ribot nicky666 at gmail.com
Mon May 28 06:35:20 PDT 2007


> Hi all,
>
> How would I test if a given polygon intersects with one of the polygons
> currently in a multypolygon geometry?
>
> I tried the && operator but if I'm not mistaken it will test the given
> polygon against the bounding box of the whole multipolygon geometry and
> not each one individually.
>
> Thanx in advance.
>

Hi,

I think you will have to explode your multipolyons into single
polygons to do that.
A multipolygon is considered by postgis as a single object, thus &&
and overlaps (or other operators) will work on all polygons composing
the multi.

You can use dump() to generate polygons out of multipolygon, then test
each individual polygon.

HTH
Nicolas



More information about the postgis-users mailing list