[mapserver-users] msQueryByFilter(): Search returned no results.

Michal Šrédl michal.sredl at gmail.com
Thu Aug 25 09:45:19 EDT 2011


Hi Jukka,

Thanks a lot. I have tried to add "wfs_include_items" "all" into layer
metadata, unfortunately it didn't help. Your request looks much like
the mine one.

Cheers,

Michal

2011/8/24 Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>:
>
> Just in case, try to add wfs_include_items "all" into layer metadata.  I am remembering that ows_include_items perhaps did not work for me some time ago.  I verified that your request works against my Mapserver 6.0. Don't look too closely the <ogc:Literal>"amenity"=>"toilets"</ogc:Literal> part, the data in the database is really literally "amenity"=>"toilets". Unfortunately my layer comes from PostGIS and not from shapefile as in your case.
>
> http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=osm_pisteet&FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>tags</ogc:PropertyName><ogc:Literal>"amenity"=>"toilets"</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
>
> -Jukka Rahkonen-
>
> Michal Šrédl wrote:
>
>> Hi all,
>
>> I am trying to use FES filter for WFS layer and get no result, even
> thought I should get one.
>
>> In my browser, I request
>
>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=<ogc:Filter
> xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>ZVER</ogc:PropertyName><ogc:Literal>2</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
>
>> and get
>
>> <wfs:FeatureCollection
> xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver
> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1
> http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
> <gml:boundedBy>
> <gml:Null>missing</gml:Null>
> </gml:boundedBy>
> </wfs:FeatureCollection>
>
> even though I do know, that features with ZVER=2 do exist.
>
> In the mapserver log file, I get
>
> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned
> no results. No matching record(s) found.
> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time
> (msLoadMap not incl.): 0.002s
> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120.
> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570.
>
> I have checked http://mapserver.org/errors.html#id2 with similar error
> "msQueryByPoint: search returned no results" and tried to create a
> simple template:
>
> <!-- MapServer Template -->
> <tr>
>  <td>[lrn]</td>
>  <td>[ZVER]</td>
> </tr>
>
> but with no effect.
>
> In the mapfile, there is
>
> LAYER
>  NAME "typ"
>  METADATA
>    "wfs_title"    "Typologie" ## REQUIRED
>    "gml_featureid" "CISLO" ## REQUIRED
>    "gml_include_items" "all"  ## Optional (serves all attributes for layer)
>    "gml_types" "auto"
>    "gml_geometries" "msGeometry"
>    "gml_msGeometry_type" "polygon"
>  END
>  DATA typ.shp
>  TYPE POLYGON
>  STATUS ON
>  PROJECTION
>    "init=epsg:102067"
>  END
>  DUMP TRUE           ## REQUIRED
>  CLASS
>    NAME "Typ"
>    STYLE
>      COLOR 0 0 155
>      OUTLINECOLOR 120 120 120
>    END
>    TEMPLATE "templates/typ_zver.html"
>  END
>  DEBUG 5
> END # Layer
>
> What is wrong with my FES filter? How can I make it to run?
>
> Thanks a lot,
>
> Michal
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list