[mapserver-users] WFS featureislike and bbox filter required?

Yewondwossen Assefa yassefa at dmsolutions.ca
Wed May 19 09:41:13 EDT 2010


Is it possible that the extents values in your  map file are not set?

regards,

On 18/05/2010 5:40 PM, mattmendick wrote:
> Hi All-
>
> I'm trying to query mapserver's wfs service (layer's data is backed by
> postgis) using the following post: (excuse the parentheses instead of<>'s,
> they are from some debug code)
>
> (wfs:GetFeature service="WFS" version="1.1.0" resultType='results'
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml") (wfs:Query srsName="EPSG:4326"
> typeName="ms:delaware_highway")
>     (ogc:PropertyName)name(/ogc:PropertyName)
>     (ogc:PropertyName)geom(/ogc:PropertyName)
>     (ogc:Filter)
>        (ogc:PropertyIsLike wildCard="*" singleChar="." escape="!")
>           (ogc:PropertyName)name(/ogc:PropertyName)
>           (ogc:Literal)*Wil*(/ogc:Literal)
>        (/ogc:PropertyIsLike)
> (/ogc:Filter)
> (/wfs:Query)
> (/wfs:GetFeature)
>
>
> I don't get back any results, but when I specify a bounding box, let's say a
> global bounding box to make it easy, I get back all the relevant results.
>
> (wfs:GetFeature service="WFS" version="1.1.0" resultType='results'
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml") (wfs:Query srsName="EPSG:4326"
> typeName="ms:delaware_highway")
>     (ogc:PropertyName)name(/ogc:PropertyName)
>     (ogc:PropertyName)geom(/ogc:PropertyName)
>     (ogc:Filter)
>        <ogc:And>
>           <ogc:BBOX>
>              <ogc:PropertyName>geom</ogc:PropertyName>
>              <gml:Envelope srsName="EPSG:4326">
>                  <gml:lowerCorner>-180 -90</gml:lowerCorner>
>                  <gml:upperCorner>180 90</gml:upperCorner>
>              </gml:Envelope>
>           </ogc:BBOX>
>           (ogc:PropertyIsLike wildCard="*" singleChar="." escape="!")
>              (ogc:PropertyName)name(/ogc:PropertyName)
>              (ogc:Literal)*Wil*(/ogc:Literal)
>           (/ogc:PropertyIsLike)
>        </ogc:And>
> (/ogc:Filter)
> (/wfs:Query)
> (/wfs:GetFeature)
>
> Is the bbox filter necessary to do a property is like?  When I don't specify
> the bounding box, the postgres query has this intersect clause: where
> wkb_geometry&&  GeomFromText('POLYGON((-1 -1,-1 -1,-1 -1,-1 -1,-1 -1))
>
> Is this trying to tell me that I need to add the bbox, or is this a bug?
>
> Thanks for your help!
>    


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: yassefa 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