OWSLib
OWSLib copied to clipboard
WFS server error. Invalid or Unsupported FILTER in GetFeature
Steps to reproduce:
wfs = WebFeatureService(url='http://geo102.fsv.cvut.cz/services/ghwfs', version='1.1.0')
filter_ = PropertyIsEqualTo(propertyname='nuts0', literal='CZ')
filterxml = etree.tostring(filter_.toXML()).decode("utf-8")
response = wfs.getfeature(typename='lucas', filter=filterxml)
returns:
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" version="1.1.0" language="en-US" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="filter">
<ows:ExceptionText>msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : <ogc:PropertyIsEqualTo xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>nuts0</ogc:PropertyName><ogc:Literal>CZ</ogc:Literal></ogc:PropertyIsEqualTo></ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Mapserver used:
mapserv -v
MapServer version 7.2.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
It seems that ogc:PropertyIsEqualTo
is supported by the Mapserver (see Capabilities):
<ogc:ComparisonOperator>EqualTo</ogc:ComparisonOperator>
Additional question:
- Why
ServiceException
is not raised in this case?