[postgis-users] Decomposing Multiploygon
strk at keybit.net
Tue Dec 16 00:15:48 PST 2003
See the Intersects(geometry, geometry) function.
You need GEOS support compiled in.
> I am new to postgis and spatial data so I apologies in advance if this
> is covered already. Google didn't turn up anything.
> I have a shape file of country outlines, each country is a multipolygon.
> I imported this using shp2postgis and created an index on the geometry
> column. So far so good.
> However, as the a search is done on the bounding box of the multi
> polygon I get more than one country returned to many searches. Eg
> querying in canada will return Canada, USA (because of the alaska ,
> mainland box), and Russia.
> So - Is there a way to query for records that contain the point in one
> of the polygons in the multipolygon? Or do I need to decompose the
> multipolygon to a polygons?
> Assuming I need to decompose, is there a utility that can do this (I
> guess one could write a postgres function to do it)
> Thanks for any help
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users