Unexpected WFS GetFeature results

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Thu Apr 14 09:02:54 PDT 2005


> -----Original Message-----
> From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca] 
> Sent: Thursday, 14 April, 2005 11:55
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results
> 
> 
> Tom,
> 
>   I have rechecked the code and when not using SQL statements, the 
> filter encoding colde would create in your case :
>   <PropertyIsLike wildCard="*" singleChar="." escape="!">
>      <PropertyName>keywords</PropertyName>
>      <Literal>benthic</Literal>
>   </PropertyIsLike> :
>    - a class item called "keywords"
>    - expression /benthic/
> 
>   The expression built like that would match your field value defined 
> like  "cabin,benthic,canada,biomonitoring,sites,site,sample,".
>   The expression generation could be thighten up to be 
> /^benthic$/. If 
> that is the inteded interpretation, please file a speperate 
> bug on this 
> and assigh it to me.
> 

...but isn't this what is happening now?  If I apply:

<PropertyName>keywords</PropertyName>
 <Literal>benthic</Literal>


...then I get no results.  If I apply:

<PropertyName>keywords</PropertyName>
 <Literal>*benthic*</Literal>

...then I get results.

My interpretation of the Filter spec PropertyIsLike construct is that
you need wildcards to do wildcard searches.

..Tom


>   Thanks for testing. Bug 1308 is closed.
> 
> Later,
> 
> Kralidis,Tom [Burlington] wrote:
> > Close out on this thread:
> > 
> > It seems that, before the changes to mapogcfilter.c, the 
> like filter 
> > evaluated directives like:
> > 
> > like 'benthic'
> > 
> > To:
> > 
> > Like '%benthic%'
> > 
> > ...whereas this was tightened up in the changes.
> > 
> > So my original test case with the GetFeature filter was getting 
> > results back when it shouldn't have, i.e. now MapServer 
> only applies 
> > wildcards around the search term if put forth by the client.
> > 
> > Thanks Assefa!
> > 
> > ..Tom
> > 
> > 
> > 
> >>-----Original Message-----
> >>From: UMN MapServer Users List
> >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of 
> >>Yewondwossen Assefa
> >>Sent: Wednesday, 06 April, 2005 13:16
> >>To: MAPSERVER-USERS at LISTS.UMN.EDU
> >>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS GetFeature results
> >>
> >>
> >>I will look today into it and provide you with the exact SQL
> >>statment created if I do not see any thing obvious.
> >>
> >>Later,
> >>
> >>
> >>Kralidis,Tom [Burlington] wrote:
> >>
> >>>Assefa,
> >>>
> >>>I tested this scenario with CVS 20050328 (the day before
> >>
> >>you committed
> >>
> >>>to mapogcfilter.c and mapogcfilter.h), and everything works fine.
> >>>
> >>>So the problem is somewhere in those changes.
> >>>
> >>>Here's the actual OGC filter:
> >>>
> >>><Filter>
> >>> <And>
> >>>  <BBOX>
> >>>   <PropertyName>NAME</PropertyName>
> >>>    <Box srsName="EPSG:4326">
> >>>     <coordinates>-141.84,21.599999999999994
> >>
> >>-56.16,74.16</coordinates>
> >>
> >>>    </Box>
> >>>  </BBOX>
> >>>  <Or>
> >>>   <Or>
> >>>    <PropertyIsLike wildCard="*" singleChar="." escape="!">
> >>>     <PropertyName>title</PropertyName>
> >>>     <Literal>benthic</Literal>
> >>>    </PropertyIsLike>
> >>>    <PropertyIsLike wildCard="*" singleChar="." escape="!">
> >>>     <PropertyName>abstract</PropertyName>
> >>>     <Literal>benthic</Literal>
> >>>    </PropertyIsLike>
> >>>   </Or>
> >>>   <PropertyIsLike wildCard="*" singleChar="." escape="!">
> >>>    <PropertyName>keywords</PropertyName>
> >>>    <Literal>benthic</Literal>
> >>>   </PropertyIsLike>
> >>>  </Or>
> >>> </And>
> >>></Filter>
> >>>
> >>>..Tom
> >>>
> >>>
> >>>
> >>>
> >>>>-----Original Message-----
> >>>>From: UMN MapServer Users List
> >>
> >>[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> >>
> >>>>On Behalf Of Yewondwossen Assefa
> >>>>Sent: Wednesday, 06 April, 2005 13:03
> >>>>To: MAPSERVER-USERS at LISTS.UMN.EDU
> >>>>Subject: Re: [UMN_MAPSERVER-USERS] Unexpected WFS 
> GetFeature results
> >>>>
> >>>>
> >>>>Tom,
> >>>>
> >>>> I did make some changes recently to the way filters were
> >>
> >>handled for
> >>
> >>>>postgis layers (Bug
> >>>>http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1292).
> >>>>
> >>>> It's probably related to thoses changes. Is it easy for
> >>
> >>you to test
> >>
> >>>>it against 4.4.x releases ? If you can test and It works I
> >>
> >>will start
> >>
> >>>>looking into the code to see what the problem is.
> >>>>
> >>>>Later,
> >>>>
> >>>>
> >>>>Kralidis,Tom [Burlington] wrote:
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>(MapServer CVS, FC2, latest stable supporting libs).
> >>>>>
> >>>>>I have a WFS instance running against a PostGIS table, and when I
> >>>>>invoke a Filter'd GetFeature operation (bbox AND a nested OR), I 
> >>>>>expect one result to be returned (only one record in the DB
> >>>>
> >>>>satisfies
> >>>>
> >>>>
> >>>>>this request).
> >>>>>
> >>>>>I've attached a sample HTML form page to correctly invoke
> >>>>
> >>>>the request.
> >>>>
> >>>>
> >>>>>However, I receive all records back in the DB.
> >>>>>
> >>>>>Any idea what's going on here?  FYI, here's my DATA string in the
> >>>>>LAYER
> >>>>>object:
> >>>>>
> >>>>> DATA "the_geom from (select service_endpoints.organization as
> >>>>>organization,service_endpoints.endpoint_getresource as 
> >>>>>endpoint_getresource,service_endpoints.service_type as 
> >>>>>service_type,service_endpoints.service_version as 
> >>>>>service_version,service_resources.the_geom as 
> >>>>>the_geom,service_resources.resource_id as 
> >>>>>resource_id,service_resources.service_id as 
> >>>>>service_id,service_resources.name as
> >>>>
> >>>>name,service_resources.title as
> >>>>
> >>>>
> >>>>>title,service_resources.abstract as
> >>>>>abstract,service_resources.keywords
> >>>>>as keywords,service_resources.dataurl as 
> >>>>>dataurl,service_resources.metadataurl as 
> >>>>>metadataurl,service_resources.legendurl as 
> >>>>>legendurl,service_resources.scale_min as 
> >>>>>scale_min,service_resources.scale_max
> >>>>>as scale_max,service_resources.srs as
> >>>>
> >>>>srs,service_endpoints.format_list
> >>>>
> >>>>
> >>>>>as format_list,service_resources.style_list as
> >>>>>style_list,service_resources.time_extent as 
> >>>>>time_extent,service_resources.queryable as queryable from 
> >>>>>service_resources inner join service_endpoints on 
> >>>>>service_endpoints.service_id =
> >>>>
> >>>>service_resources.service_id) as t using
> >>>>
> >>>>
> >>>>>unique resource_id"
> >>>>>
> >>>>>Thanks
> >>>>>
> >>>>>..Tom
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>------------------------------------------------------------
> >>
> >>----------
> >>
> >>>>>--
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>--
> >>>>----------------------------------------------------------------
> >>>>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
> >>----------------------------------------------------------------
> >>
> > 
> > 
> > 
> 
> -- 
> ----------------------------------------------------------------
> 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