You could try a feature query in MapServer/MapScript. First step is to do a 
query that
selects the polygons (probably by attribute) and then do a queryByFeatures() 
query
on the point layer. The result would be a set of points that are contained in 
your 
polygon features. Be sure to set the TOLERANCE in the point layer to 0 if you 
want
the points to be in the selection polygons.

The advantage here is that you don't have to do any up front geometry 
computations
on your polygons. It boils down to a bunch of point-in-polygon computations 
which are
relatively fast.

Steve

>>> On 11/6/2008 at 10:19 AM, in message
<[EMAIL PROTECTED]>, "Christian Jauvin"
<[EMAIL PROTECTED]> wrote:
> Hi Everyone,
> 
> I have two layers that I want to intersect: one with points, and one
> with multiple polygons representing the regions of a territory.
> 
> The first approach I just tried is doing it programmatically, through 
> Python/MS:
> 
> I first union all the region polygons, and then get the convex hull of
> this super-shape. I then restrict the points to those inside this
> convex hull.
> 
> The problem is that it is really too slow.. I'm aware that I could do
> it through PostGIS, and that performance would surely much better, but
> I'd rather stay with a more generic solution, that is applicable to
> shapefile data sources as well.
> 
> Would someone be aware of a better method, maybe one involving only
> mapfile directives?
> 
> Thank you,
> 
> Christian
> _______________________________________________
> mapserver-users mailing list
> [email protected] 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to