postgis (INTERSECTION)
Ken Lord
kenlord at GMAIL.COM
Wed Aug 31 09:52:16 PDT 2005
Hi Thip,
I recommend filling out your SQL statement much more, and using the
'intersection' within a sub-query.
Here's an example that uses the 'crosses' test, it returns the features of
a polygon table that cross the features of a line table. For my website, it
is the data source of a layer that shows forest fire polygons that cross a
pipeline, tested on the fly - requiring no pre-processing when new forest
fires are added to the dataset.
You could modify it for use with 'intersection'. My example checks for an
overlap of the bounding boxes of the features before doing the exact
'crosses' test, which speeds up the analysis tremendously.
DATA "the_geom FROM (SELECT layer1.* FROM layer1, layer2 WHERE
layer1.the_geom && layer2.the_geom AND CROSSES(layer1.the_geom,
layer2.the_geom) AS foo USING UNIQUE gid USING SRID=26910"
Cheers,
Ken Lord
Vancouver BC
On 8/31/05, Matthew Perry <perrygeo at gmail.com> wrote:
>
> Thip,
>
> On 8/31/05, Thip <thip at ait.ac.th> wrote:
> >
> > DATA " select intersection (twy_sec.the_geom, twy_su.the_geom) using
> > unique gid using SRID=-1"
> >
> Check this DATA statement against the example in the postgis docs. You may
> have to rewrite it a bit.
>
> http://postgis.refractions.net/docs/ch04.html#id2512784
>
> --
> Matt Perry
> perrygeo at gmail.com
> http://www.perrygeo.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050831/71c3f409/attachment.htm>
More information about the MapServer-users
mailing list