<br><font size=2 face="sans-serif">Does runtime substitution can help?</font>
<br><font size=2 face="sans-serif">You could post </font><tt><font size=2>latest_observation</font></tt><font size=2 face="sans-serif">=1
when calling the wms and 0 and 1 when using the wfs<br>
</font>
<br><font size=2 face="sans-serif">the filter would be </font><tt><font size=2>latest_observation</font></tt><font size=2 face="sans-serif">
in (%param%)</font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Kralidis,Tom [Ontario]"
<Tom.Kralidis@ec.gc.ca>@lists.osgeo.org</b> </font>
<br><font size=1 face="sans-serif">Envoyé par : mapserver-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">2013-06-12 08:23</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif"><mapserver-users@lists.osgeo.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[mapserver-users] WMS layer filtering</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Hi: we have a MapServer OWS instance which we use
to disseminate<br>
observations via WMS and WFS/SOS.<br>
<br>
One of our layers has 1 million records (PostGIS backend).  The layer<br>
has CLASS level EXPRESSION objects for WMS visualization/classification.<br>
We initially implemented a LAYER level FILTER, however we have use cases<br>
to serve the same layer (with the same identifier) via WFS, in which<br>
case we'd like all the data to be available.<br>
<br>
Our problem happens when visualizing via WMS.  We have a Boolean column<br>
in our PostGIS table ('latest_observation') which allows us to filter<br>
easily to visualize latest observations, which is our desired WMS<br>
default.<br>
<br>
Because we have defined CLASS level filters, the WMS GetMap request is<br>
first querying and fetching all records and _then_ applying CLASS level<br>
filters (which all include 'latest_observation=1'.  So this ends up<br>
hurting us performance wise.<br>
<br>
We'd like to have this filter at the query level so that less members<br>
are passed back from the SQL query. <br>
<br>
When we do a LAYER.FILTER with latest_observation=1, the result is<br>
instant (beautiful!).  But if we put a LAYER.FILTER, this constrains
the<br>
data access from the WFS perspective against the same LAYER def.<br>
<br>
Is there any way to apply a LAYER.FILTER type approach to work _just_ in<br>
WMS mode? We'd like all the data in WFS mode.<br>
<br>
I know we can duplicate the LAYER object as a workaround, but from a<br>
data management perspective we'd rather now.<br>
<br>
I hope I have explained this clearly enough.  Any suggestions?<br>
<br>
Thanks<br>
<br>
..Tom<br>
_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</font></tt>
<br>
<br>
<br>