Problem with wfs_filter
Yewondwossen Assefa
assefa at DMSOLUTIONS.CA
Thu Jun 1 06:36:34 PDT 2006
Christian,
You filter in your example is looking for an attribute name called
"typ" and a value equal to "REFERENCE". In the gml you sent, I do not
even see the attribute "typ". Is your filer valid ? All the filter
encoding does is convert your filter to '[typ]' = '[REFERENCE]'.
If you think the filter is valid and should retun something, You could
maybe send me your map and data and I can look into it.
Later,
Christian Wilmes wrote:
> Hi,
>
> first of all sorry for posting the same thing more than one time. I've postet this topic to the list and a few hours later it wasn't in there so I postet again.
>
> Without setting a filter in the layer everything is ok. If I do a getFeature in my browser like that:
> http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\WFS.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getFeature&TYPENAME=myWFS&BBox=3398049.324,5800890.150,3398049.60,5801890.150
>
> the result is:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> - <wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://127.0.0.1/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=myWFS&OUTPUTFORMAT=XMLSCHEMA">
> - <gml:boundedBy>
> - <gml:Box srsName="EPSG:31467">
> <gml:coordinates>3398049.522000,5800890.264000 3398049.522000,5800890.264000</gml:coordinates>
> </gml:Box>
> </gml:boundedBy>
> - <gml:featureMember>
> - <ms:myWFS>
> - <gml:boundedBy>
> - <gml:Box srsName="EPSG:31467">
> <gml:coordinates>3398049.522000,5800890.264000 3398049.522000,5800890.264000</gml:coordinates>
> </gml:Box>
> </gml:boundedBy>
> - <ms:msGeometry>
> - <gml:Point srsName="EPSG:31467">
> <gml:coordinates>3398049.522000,5800890.264000</gml:coordinates>
> </gml:Point>
> </ms:msGeometry>
> <ms:angle>30</ms:angle>
> <ms:len>0.228276476370299</ms:len>
> <ms:o_cendeg>41.16</ms:o_cendeg>
> <ms:o_cendist>1005.787</ms:o_cendist>
> <ms:o_clock>9:56:00</ms:o_clock>
> <ms:o_maxdeg>61.784</ms:o_maxdeg>
> <ms:o_maxdist>1005.819</ms:o_maxdist>
> <ms:o_mindeg>20.536</ms:o_mindeg>
> <ms:o_mindist>1005.755</ms:o_mindist>
> <ms:od>711.2</ms:od>
> <ms:top>0</ms:top>
> <ms:type>MELO-CORR</ms:type>
> <ms:wid>256</ms:wid>
> <ms:wl>24</ms:wl>
> <ms:wt>10.5</ms:wt>
> <ms:x>3398049.522</ms:x>
> <ms:y>5800890.264</ms:y>
> </ms:myWFS>
> </gml:featureMember>
> </wfs:FeatureCollection>
>
>
>
>> -------- Original-Nachricht --------
>> Datum: Wed, 31 May 2006 12:59:05 -0400
>> Von: Yewondwossen Assefa <assefa at DMSOLUTIONS.CA>
>> An: MAPSERVER-USERS at LISTS.UMN.EDU
>> Betreff: Re: [UMN_MAPSERVER-USERS] Problem with wfs_filter
>> 
> Christian,
>>
>> if you do the GetFeature request inside your browser do you get any
>>result ? If the filter is not set, do you get results back ?
>>
>>Christian Wilmes wrote:
>>
>>>Hi All,
>>>
>>>I've set up a WFS with "VirtualSpatialData" and thought everything is
>>
>>working fine, but now I have to assert, a WMS-Layer on the WFS with a
>>"wfs_filter" doesn't work. Whatever I'm typing in the wfs_filter there will not be
>>just one point in my Layer.
>>
>>>In the log-file I found the following:
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1] HTTP: Starting to
>>
>>prepare HTTP requests.\r
>>
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1] HTTP request:
>>
>>id=4,
>>http://localhost/cgi-bin/mapserv.exe?&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=myWFS&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etyp%3C%2FPropertyName%3E%3CLiteral%3EREFERENCE%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E\r
>>
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1] HTTP request:
>>
>>id=4, found in cache, skipping.\r
>>
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1] HTTP: Before
>>
>>download loop\r
>>
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1] HTTP: After
>>
>>download loop\r
>>
>>>[Tue May 30 09:37:06 2006] [error] [client 127.0.0.1]
>>
>>msHTTPExecuteRequests() timing summary per layer (connect_time + time_to_first_packet +
>>download_time = total_time in seconds)\r
>>
>>>>My mapfile for the WFS:
>>>
>>>MAP
>>> NAME WFS_Server
>>> STATUS ON
>>> WEB
>>> IMAGEPATH "c:/ms4w/tmp/ms_tmp"
>>> IMAGEURL "/ms_tmp/"
>>> METADATA
>>> "wfs_title" "WFS Server"
>>> "wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv.exe?"
>>> "wfs_srs" "EPSG:31467"
>>> END
>>> END
>>>
>>> PROJECTION
>>> "init=EPSG:31467"
>>> END
>>>
>>> CONFIG "PGSQL_OGR_FID" "id"
>>> DEBUG ON
>>>
>>> LAYER
>>> NAME myWFS
>>> DUMP TRUE
>>> DEBUG ON
>>> METADATA
>>> "wfs_title" "myWFS"
>>> "gml_include_items" "all"
>>> END
>>> TYPE POINT
>>> STATUS ON
>>> CONNECTIONTYPE OGR
>>> CONNECTION "PostgreSQL.ovf"
>>> PROJECTION
>>> "init=EPSG:31467"
>>> END
>>> END
>>>END
>>>
>>>
>>>>The WMS-Layer:
>>>
>>> LAYER
>>> NAME "RosoftWFS"
>>> TYPE POINT
>>> STATUS ON
>>> DEBUG ON
>>> CONNECTIONTYPE WFS
>>> CONNECTION "http://localhost/cgi-bin/mapserv.exe?"
>>> METADATA
>>> "wfs_typename" "myWFS"
>>> "wfs_version" "1.0.0"
>>> "wfs_request_method" "GET"
>>> "wfs_service" "WFS"
>>>
>>> "wfs_filter"
>>
>>"<PropertyIsEqualTo><PropertyName>typ</PropertyName><Literal>REFERENCE</Literal></PropertyIsEqualTo>"
>>
>>> END
>>>
>>> > PROJECTION
>>> "init=EPSG:31467"
>>> END
>>>
>>> > CLASS
>>> NAME test
>>> SYMBOL "Punkt"
>>> SIZE 10
>>> COLOR 255 0 0
>>> END
>>> END
>>>
>>>
>>>>>I would be very thankful for any help!
>>>
>>>Best Regards
>>>Christian
>>
>>--
>>----------------------------------------------------------------
>>Assefa Yewondwossen
>>Software Analyst
>>
>>Email: assefa at dmsolutions.ca
>>http://www.dmsolutions.ca/
>>
>>Phone: (613) 565-5056 (ext 14)
>>Fax: (613) 565-0925
>>----------------------------------------------------------------
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list