[mapserver-users] ms7 How to use FILTER
Lime, Steve D (MNIT)
Steve.Lime at state.mn.us
Thu Mar 26 07:20:41 PDT 2015
MapServer FILTERs are now only written using MapServer expression syntax (e.g. ("[someitem]" != "someval")). Drivers can support translation capabilities to create native SQL under the hood. This was done to standardize the syntax across all drivers. Prior to 7.0 the syntax varied by driver. In addition, FILTER values are preserved when used with WFS or native MapServer attribute queries.
With database backends there has been little reason to use FILTERs since you could often just extend the DATA statement.
Note that if need to you can still define a native SQL independently of the DATA statement using the processing tag "native_filter", for example:
PROCESSING "native_filter=native SQL string"
This is also preserved with WFS. Does this help?
Steve
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve.Toutant at inspq.qc.ca
Sent: Thursday, March 26, 2015 8:20 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] ms7 How to use FILTER
I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection)
In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement.
In the ms7 Mapfile-Layer-Data doc, I see for Oracle
"Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER<http://mapserver.org/mapfile/layer.html#filter> whenever possible instead."
I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten.
Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)?
THANKS!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150326/f1a0b2a7/attachment.htm>
More information about the MapServer-users
mailing list