[mapserver-users] MapServer Layer Filter not applying to WFS
Hawk AA
hawk at aamdal.com
Wed Nov 7 07:38:53 PST 2012
Hi,
Thanks for the help.
Using filter in the CLASS did nothing more than adding FILTER to the layer
tag. I tried this definition:
LAYER
NAME Traseer
GROUP TelMe
TYPE LINE
DATA "TM_Nett/TM_Traces"
minscaledenom 0
maxscaledenom 5500000
CLASS
EXPRESSION ('[type]' !=
"LUFT")
TEMPLATE 'void'
NAME "TelMe_Traseer"
STYLE
COLOR 255 0 0
WIDTH 2
END
END # Layer
It does not display the data, nor queryable in MapScript, but I can get the
feature geometry with WFS.
Ive until now used CONNECTIONTYPE OGR with CONNECTION, and it has worked
flawlessly. Recently, when upgrading to PHP 5.4, it started UTF-8 encoding
my tables. Ive addressed the issue here:
http://comments.gmane.org/gmane.comp.gis.mapserver.user/49756 . I have some
more research to do regarding the issue, but Id be very thankful for any
hints.
Håkon
From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
Sent: 5. november 2012 18:30
To: Hawk AA; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] MapServer Layer Filter not applying to WFS
One other idea. I believe you can avoid using OGR by adding your filter to
class expressions and setting a template (which enables queries) at the
class level. Class expressions are always checked. If you have one class
its easy:
LAYER
NAME Traseer
GROUP TelMe
TYPE LINE
DATA "TM_Nett/TM_Traces"
CLASS
EXPRESSION'[type]' != "Bru")
# Styling and more etc....
TEMPLATE void
END
# No template set at the layer level
END
Might consider WMS-only vs. WFS-only layer defs to simplify life if you have
multiple classes.
Steve
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Hawk AA
Sent: Monday, November 05, 2012 8:26 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] MapServer Layer Filter not applying to WFS
Hi there, mailing list,
We have a customer sending us data with sensitive information. The most
convenient way for us is to receive the complete data set and applying a
filter in the mapfile.
The layer definition looks like this:
LAYER
NAME Traseer
GROUP TelMe
TYPE LINE
DATA "TM_Nett/TM_Traces"
FILTER('[type]' != "Bru")
#Styling and more etc....
END
This works flawlessly using PHP Mapscript and the mapserver WMS service. The
data is not accessible. The problem occurs when querying by WFS. The
Mapserver WFS service seems to omit the FILTER information and opens up for
selecting items with the type Bru, which is a serious security flaw.
Id consider this as a bug, although Im not certain. If anyone please can
confirm this, or show me how to make mapserver filter data in WFS as well,
Id be much obliged.
Best Regards,
Håkon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121107/607fad76/attachment.htm>
More information about the MapServer-users
mailing list