postgis (INTERSECTION)
Matthew Perry
perrygeo at GMAIL.COM
Tue Aug 30 23:56:02 PDT 2005
Thip,
On 8/30/05, Thip <thip at ait.ac.th> wrote: I need to create one layer on fly
using intersection. (Layer name are twy_sec and twy_su, new layer name is
twy_intersection) SO I write down in the map file which is not working. Does
anyone have suggestion?
At the minimum you'll need to include a CLASS item in your LAYER.
CLASS
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END
In addition you might want to check the postgis connection string. Three
things that jump out at me are that
1) you must use "using UNIQUE gid"
2) you should probably rewrite it as nested selects like "SELECT geom from
(SELECT intersect(...) as geom from ...) as table using unique gid using
srid = -1"
3) be forewarned that intersections in postgis can be painfully slow.
Depending on your users need and the size of the table, it may be worth it
to pre-process this data if speed is a factor.
Also remember to put indexes on the gid column, and gist indexes on geom.
Check out the postgis docs for more details -
http://postgis.refractions.net/docs/
Hope this helps,
--
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/20050830/7cb11f0b/attachment.htm>
More information about the MapServer-users
mailing list