[mapserver-users] WMS layer filtering

2013-06-12 Thread Kralidis,Tom [Ontario]
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS layer filtering

2013-06-12 Thread Julien Cigar

On 06/12/2013 14:23, Kralidis,Tom [Ontario] wrote:

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?


It may seems strange (?), but there is nothing in the WMS spec to filter 
a WMS layer (that's why Geoserver has CQL filters), and I think the "OGC 
way" to filter a WMS request is through an SLD stylesheet (which can be 
generated dynamically).



Thanks

..Tom
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users