Re: [mapserver-users] Mapserver ogc:Filter fails against Geoserver WFS
Thanks Andreas, I tried to provide the complete filter with leading ogc:Filter xmlns:ogc=http://www.opengis.net/ogc; tag and I had to cut it away manually to make it work at least against another mapserver. Yes, I can try to use Filter tag. I belive it can work against Geoserver. But I already do know that it would not work against Intergraph server. E.g. the following request can be broken by taking the namespaces away: http://portal.ingr.briseide.eu/TRACASA_VD12_WFS/wfservice.aspx?request=getfeatureservice=wfsversion=1.1.0typename=CATAST_POL_SUBPARURBAfilter=ogc:Filter+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsLessThan+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNamePARCELA/ogc:PropertyNameogc:Literal200/ogc:Literal/ogc:PropertyIsLessThan/ogc:Filter I don't dare to blame Intergraph in this case, as they are just following FES and XML standards. I tried to use POST instead of GET, and this is what I saw: ?xml version=1.0 ? wfs:GetFeature service=WFS version=1.0.0 outputFormat=GML2 wfs:Query typeName=ccss:Flood2010_FloodActivityGrade ogc:Filter ogc:PropertyIsEqualTo xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNameSTUPEN/ogc:PropertyNameogc:Literal3/ogc:Literal/ogc:PropertyIsEqualTo /ogc:Filter /wfs:Query /wfs:GetFeature As you can see, this is again not a vaild XML as it does not define the namespaces. Mapserver doesn't mind, but other servers are using standard XML libraries to parse it and they can not. Best Regards, Michal 2012/1/9 Eichner, Andreas - SID-NLKM andreas.eich...@sid.sachsen.de: At least in version 6.0.1 MapServer checks if a Filter or ogc:Filter tag was given in wfs_filter metadata and uses this. So you should be able to use Filter without a namespace prefix. -Ursprüngliche Nachricht- Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Michal Šrédl Gesendet: Freitag, 6. Januar 2012 10:52 An: mapserver-users@lists.osgeo.org Cc: Premysl Vohnout; Jachym Cepicky Betreff: [mapserver-users] Mapserver ogc:Filter fails against Geoserver WFS Dear all, I am not able to use WFS filter in Mapserver Mapfile against the Geoserver WFS, apparently as Mapserver produces invalid XML as the final filter that goes to the request. In Mapfile, I say LAYER METADATA wfs_filter 'ogc:PropertyIsEqualTo xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyNameSTUPE N/ogc:PropertyNameogc:Literal3/ogc:Literal/ogc:PropertyIsEqualTo' (the whole Mapfile is attached) The request that leaves Mapserver towards the Geoserver WFS looks like this: http://88.81.191.230:8080/geoserver/ows?REQUEST=GetFeatureVE RSION=1.0.0SERVICE=WFSTYPENAME=ccss:Flood2010_FloodActivityG radeFILTER=ogc:Filterogc:PropertyIsEqualTo+xmlns:ogc=http://www.opengis.net/ogc;og c:PropertyNameSTUPEN/ogc:PropertyNameogc:Literal3/ogc:Li teral/ogc:PropertyIsEqualTo/ogc:Filter Please note the ogc:Filter filter tag - with namespace used, but not defined. This is an issue, as it is not valid and Geoserver replies with an exception. Changing manually the filter tag either to Filter or ogc:Filter+xmlns:ogc=http://www.opengis.net/ogc; makes the whole thing work. Unfortunately, the Mapserver documentation [1] says, that The filter given as a value of the wfs_filter metadata should not contain Filter start and end tags. So whatever I provide as the wfs_filter value, is later broken by ogc:Filter tag. Do you consider it a bug? Or is there any way how to make Mapserver to create the filter as valid XML? Or let me include the Filter tag in the wfs_filter? Thank you for your advice, Michal Note: Mapserver itself wouldn't mind such a behaviour and would accept such a request, e.g. this one: http://bnhelp.cz/cgi-bin/crwfs/cgi-bin/crwfs?REQUEST=GetFeatu reVERSION=1.0.0SERVICE=WFSTYPENAME=okresyFILTER=ogc:Filte rogc:PropertyIsLessThan+xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyName KODOK/ogc:PropertyNameogc:Literal3555/ogc:Literal/ogc:P ropertyIsLessThan/ogc:Filter But Geoserver is not that tolerant... [1] http://mapserver.org/ogc/filter_encoding.html ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MapServer as WFS 1.1.0 does NOT support correct axis order
Hi all, we met a bug related to axis order in WFS 1.1.0 as described here: http://trac.osgeo.org/mapserver/ticket/4118 Have anybody had a time already to check it? Thanks a lot, Michal ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS client and WMS 1.3.0
Hi Jukka, all, I was asking about applying WFS 1.1.0 FES filter (while cascading, but this is not the issue). I don't get any error message, rather the filter seems not to be applied. Documentation (http://mapserver.org/ogc/filter_encoding.html#use-of-filter-encoding-in-mapserver) mentions FES 1.0.0, so the question is whether WFS 1.1.0 filtering is supported. The original email can be found here: http://lists.osgeo.org/pipermail/mapserver-users/2011-November/070726.html Thanks a lot, Michal 2011/11/17 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Somebody was asking about cascading an external WMS 1.3.0 server. I remember that the one who asked the questiod had captured a rather self-explaining error message like this one from our Mapserver 6.0 msBuildWMSLayerURL(): WMS connection error. MapServer supports only WMS 1.0.0 to 1.1.1 (please verify the VERSION parameter in the connection string). Perhaps it would be still worth adding a line about supported versions into the Limitations/TODO in document http://mapserver.org/ogc/wms_client.html -Jukka Rahkonen- ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] FES 1.1.0 in mapfile
Hi all, I am trying to use Filter Encoding in mapfile. Here http://mapserver.org/ogc/filter_encoding.html#filter-encoding is an example given, which goes like this: wfs_version 1.0.0 wfs_filter PropertyIsGreaterThanPropertyNamePOPULATION/PropertyName Literal1000/Literal/PropertyIsGreaterThan with remark The filter given as a value of the wfs_filter metadata should not contain Filter start and end tags. However, I would like to use something like wfs_version 1.1.0 wfs_filter 'ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameSLT/ogc:PropertyNameogc:Literal1A/ogc:Literal/ogc:PropertyIsEqualTo/ogc:Filter' Two questions arise: - Is wfs(fes) version 1.1.0 supported? - How am I expected to specify the namespaces, if start and end Filter tags should be omitted? FYI, direct request http://localhost//cgi-bin/ows?REQUEST=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameSLT/ogc:PropertyNameogc:Literal1A/ogc:Literal/ogc:PropertyIsEqualTo/ogc:Filter works just nice, now I am trying to automatically generate the mapfile by dedicated python proxy using mapscript; the filter itself is generated by OpenLayers in the javascript web client. Thank you very much for your advice. Michal ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] FES 1.1.0 in mapfile
Hi Jukka, 2011/11/11 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Some quick questions: Are you planning to cascade some other, remote WFS service through your Mapserver? Yes. And that remote service is using WFS 1.1.0? Yes. Is the remote service something you know or could it be just any WFS service, made with Mapserver, Geoserver, TinyOWS, deegree, ESRI product, Oracle etc. ? It can be any WFS service. For development, I use my Mapserver twice, first as a remote WFS server and then to back my python proxy. For deployment, the remote wfs service is meant to be any wfs 1.1.0 service. Cheers, Michal -Jukka Rahkonen- Michal Šrédl wrote: Hi all, I am trying to use Filter Encoding in mapfile. Here http://mapserver.org/ogc/filter_encoding.html#filter-encoding is an example given, which goes like this: wfs_version 1.0.0 wfs_filter PropertyIsGreaterThanPropertyNamePOPULATION/PropertyName Literal1000/Literal/PropertyIsGreaterThan with remark The filter given as a value of the wfs_filter metadata should not contain Filter start and end tags. However, I would like to use something like wfs_version 1.1.0 wfs_filter 'ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualTo ogc:PropertyNameSLT/ogc:PropertyNameogc:Literal1A/ogc:L iteral/ogc:PropertyIsEqualTo/ogc:Filter' Two questions arise: - Is wfs(fes) version 1.1.0 supported? - How am I expected to specify the namespaces, if start and end Filter tags should be omitted? FYI, direct request http://localhost//cgi-bin/ows?REQUEST=GetFeatureVERSION=1.1.0 SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualTo ogc:PropertyNameSLT/ogc:PropertyNameogc:Literal1A/ogc:L iteral/ogc:PropertyIsEqualTo/ogc:Filter works just nice, now I am trying to automatically generate the mapfile by dedicated python proxy using mapscript; the filter itself is generated by OpenLayers in the javascript web client. Thank you very much for your advice. Michal ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
Hi Steve, may be you are right, because when I replace epsg:102067 with epsg:3035 it works fine Cheers, Michal 2011/8/29 Steve Lime sdl...@gmail.com: Looking at the code the correct projection work is done. I wonder if there's something funky projecting the globe (-180 -90 180 90) to epsg:102067. Steve 2011/8/26 Steve Lime sdl...@gmail.com: Ok, definitely a bug here... Will take a look. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Steve, for epsg:4326 and url http://localhost//cgi-bin/ows?mode=itemnqueryqlayer=typqitem=zverqstring=2 it says msQueryByAttributes(): Search returned no results. No matching record(s) found, layer and area of interest do not overlap. Cheers, Mike 2011/8/26 Steve Lime sdl...@gmail.com: You must have a default mapfile set in apache, that's cool. Use the second URL. Change qstring_validation to qstring_validation_pattern from my first message, my mistake. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Steve, regardless of the projection settings, I get the following result: For http://localhost//cgi-bin/ows?map=mapfilemode=itemnqueryqlayer=typqitem=zverqstring=2 I see msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed. msEvalRegex(): Regular expression error. String failed expression test. And for http://localhost//cgi-bin/ows?mode=itemnqueryqlayer=typqitem=zverqstring=2 I see mapserv(): Web application error. Parameter 'qstring' value fails to validate. msValidateParameter(): Regular expression error. Parameter pattern validation failed. Cheers, Michal 2011/8/26 Steve Lime sdl...@gmail.com: I would agree this sounds like a bug. The map extent *should* be projected to the layer extent and that's what's used to identify candidate features. Can you check what happens with a native mapserver attribute query in this case? If possible try this: 1) set your MAP projection back to geographic, and restore your geographic map extent. 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' 3) go to the following URL: http://localhost//cgi-bin/ows?map=[yourmapfile]mode=itemnqueryqlayer=typqitem=zverqstring=2 and see what happens. This will run a different query function msQueryByAttributes() that's not new to 6.0.x. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Jukka, the current settings returns expected result with srsName=EPSG:4326 as well. The original settings doesn't work neither with srsName=EPSG:4326 nor srsName=EPSG::102067. Yes, it looks like there would be a problem in case of several WFS layers with different projections of the source data. Cheers, Mike 2011/8/26 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. Could you have one more trial with the original settings and see if adding srsName=EPSG:4326 or srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with srsName=EPSG:4326. -Jukka Rahkonen. Michal Šrédl wrote: Hi all, problem solved. I needed to set: EXTENT -905000 -123 -40 -90 and PROJECTION ## init=epsg:4326 init=epsg:102067 END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal Šrédl michal.sr...@gmail.com: 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
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
Hi Jukka, the current settings returns expected result with srsName=EPSG:4326 as well. The original settings doesn't work neither with srsName=EPSG:4326 nor srsName=EPSG::102067. Yes, it looks like there would be a problem in case of several WFS layers with different projections of the source data. Cheers, Mike 2011/8/26 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. Could you have one more trial with the original settings and see if adding srsName=EPSG:4326 or srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with srsName=EPSG:4326. -Jukka Rahkonen. Michal Šrédl wrote: Hi all, problem solved. I needed to set: EXTENT -905000 -123 -40 -90 and PROJECTION ## init=epsg:4326 init=epsg:102067 END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal Šrédl michal.sr...@gmail.com: 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 sdl...@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.sr...@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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/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=WFSVERSION=1.1.0REQUEST=DescribeFeatureTypeTYPENAME=typOUTPUTFORMAT=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:Nullmissing/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
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
Hi Steve, regardless of the projection settings, I get the following result: For http://localhost//cgi-bin/ows?map=mapfilemode=itemnqueryqlayer=typqitem=zverqstring=2 I see msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed. msEvalRegex(): Regular expression error. String failed expression test. And for http://localhost//cgi-bin/ows?mode=itemnqueryqlayer=typqitem=zverqstring=2 I see mapserv(): Web application error. Parameter 'qstring' value fails to validate. msValidateParameter(): Regular expression error. Parameter pattern validation failed. Cheers, Michal 2011/8/26 Steve Lime sdl...@gmail.com: I would agree this sounds like a bug. The map extent *should* be projected to the layer extent and that's what's used to identify candidate features. Can you check what happens with a native mapserver attribute query in this case? If possible try this: 1) set your MAP projection back to geographic, and restore your geographic map extent. 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' 3) go to the following URL: http://localhost//cgi-bin/ows?map=[yourmapfile]mode=itemnqueryqlayer=typqitem=zverqstring=2 and see what happens. This will run a different query function msQueryByAttributes() that's not new to 6.0.x. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Jukka, the current settings returns expected result with srsName=EPSG:4326 as well. The original settings doesn't work neither with srsName=EPSG:4326 nor srsName=EPSG::102067. Yes, it looks like there would be a problem in case of several WFS layers with different projections of the source data. Cheers, Mike 2011/8/26 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. Could you have one more trial with the original settings and see if adding srsName=EPSG:4326 or srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with srsName=EPSG:4326. -Jukka Rahkonen. Michal Šrédl wrote: Hi all, problem solved. I needed to set: EXTENT -905000 -123 -40 -90 and PROJECTION ## init=epsg:4326 init=epsg:102067 END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal Šrédl michal.sr...@gmail.com: 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 sdl...@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.sr...@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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/ogc:Literal/ogc:PropertyIsEqualTo
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
Hi Steve, for epsg:4326 and url http://localhost//cgi-bin/ows?mode=itemnqueryqlayer=typqitem=zverqstring=2 it says msQueryByAttributes(): Search returned no results. No matching record(s) found, layer and area of interest do not overlap. Cheers, Mike 2011/8/26 Steve Lime sdl...@gmail.com: You must have a default mapfile set in apache, that's cool. Use the second URL. Change qstring_validation to qstring_validation_pattern from my first message, my mistake. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Steve, regardless of the projection settings, I get the following result: For http://localhost//cgi-bin/ows?map=mapfilemode=itemnqueryqlayer=typqitem=zverqstring=2 I see msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed. msEvalRegex(): Regular expression error. String failed expression test. And for http://localhost//cgi-bin/ows?mode=itemnqueryqlayer=typqitem=zverqstring=2 I see mapserv(): Web application error. Parameter 'qstring' value fails to validate. msValidateParameter(): Regular expression error. Parameter pattern validation failed. Cheers, Michal 2011/8/26 Steve Lime sdl...@gmail.com: I would agree this sounds like a bug. The map extent *should* be projected to the layer extent and that's what's used to identify candidate features. Can you check what happens with a native mapserver attribute query in this case? If possible try this: 1) set your MAP projection back to geographic, and restore your geographic map extent. 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' 3) go to the following URL: http://localhost//cgi-bin/ows?map=[yourmapfile]mode=itemnqueryqlayer=typqitem=zverqstring=2 and see what happens. This will run a different query function msQueryByAttributes() that's not new to 6.0.x. Steve 2011/8/26 Michal Šrédl michal.sr...@gmail.com: Hi Jukka, the current settings returns expected result with srsName=EPSG:4326 as well. The original settings doesn't work neither with srsName=EPSG:4326 nor srsName=EPSG::102067. Yes, it looks like there would be a problem in case of several WFS layers with different projections of the source data. Cheers, Mike 2011/8/26 Rahkonen Jukka jukka.rahko...@mmmtike.fi: Hi, Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. Could you have one more trial with the original settings and see if adding srsName=EPSG:4326 or srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with srsName=EPSG:4326. -Jukka Rahkonen. Michal Šrédl wrote: Hi all, problem solved. I needed to set: EXTENT -905000 -123 -40 -90 and PROJECTION ## init=epsg:4326 init=epsg:102067 END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal Šrédl michal.sr...@gmail.com: 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 sdl...@gmail.com: What is your default EXTENT set to in your
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
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.rahko...@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:Literalamenity=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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=osm_pisteetFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNametags/ogc:PropertyNameogc:Literalamenity=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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/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=WFSVERSION=1.1.0REQUEST=DescribeFeatureTypeTYPENAME=typOUTPUTFORMAT=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:Nullmissing/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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
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_titleMIS 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_titleTypologie ## 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_nameobce,kraje,hr_cr,sidla,doprava wms_titleCR 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 sdl...@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.sr...@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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/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=WFSVERSION=1.1.0REQUEST=DescribeFeatureTypeTYPENAME=typOUTPUTFORMAT=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:Nullmissing/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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msQueryByFilter(): Search returned no results.
Hi all, problem solved. I needed to set: EXTENT -905000 -123 -40 -90 and PROJECTION ## init=epsg:4326 init=epsg:102067 END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal Šrédl michal.sr...@gmail.com: 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 sdl...@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.sr...@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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/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=WFSVERSION=1.1.0REQUEST=DescribeFeatureTypeTYPENAME=typOUTPUTFORMAT=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:Nullmissing/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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver
[mapserver-users] msQueryByFilter(): Search returned no results.
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=GetFeatureVERSION=1.1.0SERVICE=WFSTYPENAME=typFILTER=ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualToogc:PropertyNameZVER/ogc:PropertyNameogc:Literal2/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=WFSVERSION=1.1.0REQUEST=DescribeFeatureTypeTYPENAME=typOUTPUTFORMAT=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:Nullmissing/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_titleTypologie ## 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users