[Mapserver-users] MORE PostGIS Questions - Expression
Zamil Murji
Zamil.Murji at divestco.com
Tue Jul 8 13:17:30 PDT 2003
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
More information about the MapServer-users
mailing list