Hi,
I don't see any obvious problem with your filter. Can you try to set
the filter element on your layer to an expression equivalent to your wfs
filter, (assuming that the underlying data is a shape/OGR), something
like this: FILTER (([von_pegel] >= 70 or [bis_pegel] <
> 70) and '[datumzeit]' = '2009-07-09 12:00:00') and see if you get
what you expect. If you get what you expect, you can send me off line
your map/data and I can look at it using the wfs filter.
best regards
Ergün Ayduran (GMX) wrote:
Hi,
i want to filter set a filter in a wfs request:
I want to get all polygons, where ("von_pegel" >= 70 or "bis_pegel" <
70) and datumzeit = 2009-07-09 12:00:00.
I tried it with the request:
http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/webgis/mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=flood&Filter<Filter><And><Or><PropertyIsGreaterThanOrEqualTo><PropertyName>von_pegel</PropertyName><Literal>70</Literal></PropertyIsGreaterThanOrEqualTo><PropertyIsLessThan><PropertyName>bis_pegel</PropertyName><Literal>70</Literal></PropertyIsLessThan></Or><PropertyIsEqualTo><PropertyName>datumzeit</PropertyName><Literal>2009-07-09%2012:00:00</Literal></PropertyIsEqualTo></And></Filter
<http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/webgis/mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=flood&Filter<Filter><And><Or><PropertyIsGreaterThanOrEqualTo><PropertyName>von_pegel</PropertyName><Literal>70</Literal></PropertyIsGreaterThanOrEqualTo><PropertyIsLessThan><PropertyName>bis_pegel</PropertyName><Literal>70</Literal></PropertyIsLessThan></Or><PropertyIsEqualTo><PropertyName>datumzeit</PropertyName><Literal>2009-07-09%2012:00:00</Literal></PropertyIsEqualTo></And></Filter>>
and with this request (is the same request,without %20 in date)
http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/webgis/mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=flood&Filter<Filter><And><Or><PropertyIsGreaterThanOrEqualTo><PropertyName>von_pegel</PropertyName><Literal>70</Literal></PropertyIsGreaterThanOrEqualTo><PropertyIsLessThan><PropertyName>bis_pegel</PropertyName><Literal>70</Literal></PropertyIsLessThan></Or><PropertyIsEqualTo><PropertyName>datumzeit</PropertyName><Literal>2009-07-09
<http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/webgis/mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=flood&Filter<Filter><And><Or><PropertyIsGreaterThanOrEqualTo><PropertyName>von_pegel</PropertyName><Literal>70</Literal></PropertyIsGreaterThanOrEqualTo><PropertyIsLessThan><PropertyName>bis_pegel</PropertyName><Literal>70</Literal></PropertyIsLessThan></Or><PropertyIsEqualTo><PropertyName>datumzeit</PropertyName><Literal>2009-07-09>
12:00:00</Literal></PropertyIsEqualTo></And></Filter>
Both requests response me only all polygons.
Example:
(1) 0 - 50
(2) 50 - 100
(3) 100 - 150
(4) 150 - 200
Setting the filter should response only (2), (3) and (4)
Plz, can anyone tell me, what is wrong in my filter.
EA
------------------------------------------------------------------------
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: [email protected]
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users