Steve: thanks for the info.  Good point.  It would help, however the client 
would require apriori knowledge, which won't help in our case because we want 
things more generic.

Of course, there's always MapScript (i.e. set LAYER.FILTER only if it's a WMS 
GetMap/GetFeatureInfo request), but I was hoping for something less involved, 
or configurable.



From: [email protected] [mailto:[email protected]] 
Sent: June 12, 2013 8:40 AM
To: Kralidis,Tom [Ontario]
Cc: [email protected]; [email protected]
Subject: RE [mapserver-users] WMS layer filtering


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]" <[email protected]>@lists.osgeo.org 
Envoyé par : [email protected] 
2013-06-12 08:23 
A
<[email protected]> 
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to