[Mapserver-users] MORE PostGIS Questions - Expression
Paul Ramsey
pramsey at refractions.net
Tue Jul 8 14:55:36 PDT 2003
Your EXPRESSION does not reference a column name. That is only "OK" as long as
you define a CLASSITEM in the LAYER, for the CLASSes to refer to. I don't know
if regex expressions work in the context of the CLASSITEM, though. It might
only be direct equality tests.
MAP
...
LAYER
CLASSITEM foo
...
CLASS
EXPRESSION bar
...
END
END
END
Quoting Zamil Murji <Zamil.Murji at divestco.com>:
> 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