[mapserver-users] RE WMS layer filtering

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Wed Jun 12 05:39:39 PDT 2013


Does runtime substitution can help?
You could post latest_observation=1 when calling the wms and 0 and 1 when 
using the wfs

the filter would be latest_observation in (%param%)




"Kralidis,Tom [Ontario]" <Tom.Kralidis at ec.gc.ca>@lists.osgeo.org 
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2013-06-12 08:23

A
<mapserver-users at lists.osgeo.org>
cc

Objet
[mapserver-users] WMS layer filtering








Hi: we have a MapServer OWS instance which we use to disseminate
observations via WMS and WFS/SOS.

One of our layers has 1 million records (PostGIS backend).  The layer
has CLASS level EXPRESSION objects for WMS visualization/classification.
We initially implemented a LAYER level FILTER, however we have use cases
to serve the same layer (with the same identifier) via WFS, in which
case we'd like all the data to be available.

Our problem happens when visualizing via WMS.  We have a Boolean column
in our PostGIS table ('latest_observation') which allows us to filter
easily to visualize latest observations, which is our desired WMS
default.

Because we have defined CLASS level filters, the WMS GetMap request is
first querying and fetching all records and _then_ applying CLASS level
filters (which all include 'latest_observation=1'.  So this ends up
hurting us performance wise.

We'd like to have this filter at the query level so that less members
are passed back from the SQL query. 

When we do a LAYER.FILTER with latest_observation=1, the result is
instant (beautiful!).  But if we put a LAYER.FILTER, this constrains the
data access from the WFS perspective against the same LAYER def.

Is there any way to apply a LAYER.FILTER type approach to work _just_ in
WMS mode? We'd like all the data in WFS mode.

I know we can duplicate the LAYER object as a workaround, but from a
data management perspective we'd rather now.

I hope I have explained this clearly enough.  Any suggestions?

Thanks

..Tom
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130612/709bf713/attachment.htm>


More information about the MapServer-users mailing list