[mapserver-users] RE WMS layer filtering (UNCLASSIFIED)

Kralidis,Tom [Ontario] Tom.Kralidis at ec.gc.ca
Wed Jun 12 06:03:20 PDT 2013


Hi Michael: thanks.  That definitely works, thanks (although that means managing two endpoints downstream, but I'm starting to think I'm asking too much here :) 

Thanks

..Tom


> -----Original Message-----
> From: Smith, Michael ERDC-CRREL-NH
> [mailto:Michael.Smith at usace.army.mil]
> Sent: June 12, 2013 8:57 AM
> To: Kralidis,Tom [Ontario]; Steve.Toutant at inspq.qc.ca
> Cc: mapserver-users at lists.osgeo.org; mapserver-users-
> bounces at lists.osgeo.org
> Subject: RE: [mapserver-users] RE WMS layer filtering (UNCLASSIFIED)
> 
> Classification: UNCLASSIFIED
> Caveats: NONE
> 
> Could you use script wrappers to set different environment variables
> 
> Eg a wms file and a wfs file
> 
> Your WMS file
> #!/bin/sh
> MS_MAPFILE=/path/to/mapfile
> export MS_MAPFILE
> export LATEST_OBS=1
> /cgi-bin/mapserv
> 
> 
> WFS File
> #!/bin/sh
> MS_MAPFILE=/path/to/mapfile
> export MS_MAPFILE
> export LATEST_OBS=0
> /cgi-bin/mapserv
> 
> 
> And then use %LATEST_OBS% in your
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-
> bounces at lists.osgeo.org] On Behalf Of Kralidis,Tom [Ontario]
> Sent: Wednesday, June 12, 2013 8:44 AM
> To: Steve.Toutant at inspq.qc.ca
> Cc: mapserver-users at lists.osgeo.org; mapserver-users-
> bounces at lists.osgeo.org
> Subject: Re: [mapserver-users] RE WMS layer filtering
> 
> 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: Steve.Toutant at inspq.qc.ca [mailto:Steve.Toutant at inspq.qc.ca]
> Sent: June 12, 2013 8:40 AM
> To: Kralidis,Tom [Ontario]
> Cc: mapserver-users at lists.osgeo.org; mapserver-users-
> bounces at lists.osgeo.org
> 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]" <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
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> Classification: UNCLASSIFIED
> Caveats: NONE
> 



More information about the mapserver-users mailing list