[Mapserver-users] MORE PostGIS Questions - Expression
Charlton Purvis
cpurvis at asg.sc.edu
Tue Jul 8 13:34:33 PDT 2003
Try FILTER instead of EXPRESSION (don't know what version of MS you're
using). It keeps all the work on the database side.
http://mapserver.gis.umn.edu/doc/mapfile-reference.html#filter
-----Original Message-----
From: Zamil Murji [mailto:Zamil.Murji at divestco.com]
Sent: Tuesday, July 08, 2003 4:18 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] MORE PostGIS Questions - Expression
Hello all,
I am using the cgi version of mapserv. With shapefiles it is possible to
dynamically select items in a layer by passing them along the url and
using the corresponding EXPRESSION tag in the .map file. I want to do
something similar with PostGIS, can this be done?
Here are 3 rows from my db and my .map file for them:
idc=# select * from oilwells;
well_id | geom | name
---------+--------------------------------------+-------
1 | SRID=4326;POINT(-110.04146 49.01449) | ONE
2 | SRID=4326;POINT(-110.24459 49.01449) | TWO
3 | SRID=4326;POINT(-110.43138 49.01449) | THREE
(3 rows)
#PostGIS Data Layer
LAYER
NAME "oilwells"
TYPE point
STATUS off
CONNECTIONTYPE postgis
CONNECTION "user=idc dbname=idc host=sdb2 port=5432"
# DATA "geom from (select * from oilwells) as foo using unique id
using SRID=4326"
DATA "geom from oilwells"
CLASS
# EXPRESSION /x/
COLOR 0 0 0
SYMBOL 'circle'
SIZE 20
# TEMPLATE "c:\\mapfiles\test.html"
END
END
If I take uncomment EXPRESSION tag, then this layer never shows up.
Please help
Thanks
Zamil
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list