[mapserver-users] msQueryByFilter(): Search returned no results.
Michal Šrédl
michal.sredl at gmail.com
Thu Aug 25 06:48:38 PDT 2011
Hi Steve,
Thanks a lot. The extent should be large enough to encompass all the
features. Here comes the whole mapfile:
MAP
NAME "MIS WFS Server"
STATUS ON
SIZE 500 500
EXTENT -180 -90 180 90
SHAPEPATH "data/"
IMAGECOLOR 255 255 255
CONFIG MS_ERRORFILE "log/mapserv.log"
DEBUG 5
WEB
IMAGEPATH "/var/www/tmp/"
IMAGEURL "/tmp/"
METADATA
"wfs_title" "MIS WFS Server" ## REQUIRED
"wfs_onlineresource" "http://127.0.0.1/cgi-bin/ows?"
"wfs_srs" "EPSG:4326 EPSG:102067"
"wms_srs" "EPSG:4326 EPSG:102067" ## Recommended
"wcs_srs" "EPSG:4326 EPSG:102067" ## Recommended
"ows_enable_request" "*"
"ows_updatesequence" "2011-29-05T00:24:00"
END
END
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "typ"
METADATA
"wfs_title" "Typologie" ## REQUIRED
"wfs_include_items" "all"
"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
LAYER
NAME "hsrs"
TYPE RASTER
STATUS ON
CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?"
DEBUG ON
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "obce,kraje,hr_cr,sidla,doprava"
"wms_title" "CR Topo"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549"
END
END
END # Map File
Cheers,
Michal
2011/8/25 Steve Lime <sdlime at gmail.com>:
> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve
>
> Sent from my iPad
>
> On Aug 24, 2011, at 7:58 AM, Michal Šrédl <michal.sredl at gmail.com> 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
>
More information about the MapServer-users
mailing list