Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error GetFeature with parameter MAP in MapServer and QGIS Server #534

Open
samtux opened this issue Dec 8, 2018 · 0 comments
Open

Error GetFeature with parameter MAP in MapServer and QGIS Server #534

samtux opened this issue Dec 8, 2018 · 0 comments

Comments

@samtux
Copy link

samtux commented Dec 8, 2018

For URLs that include map parameter, such as path of project Mapserver or QGIS Server, the GetFeature (GET) operation constructs an erroneous request URL. Example:

from owslib.wfs import WebFeatureService

url = "http://visorgeo.ambientebogota.gov.co/map/?map=/geodata/mapserver/mapfiles/calidad_aire/estacion.map"

wfs2 = WebFeatureService(url=url, version="2.0.0") 
wfs2.getGETGetFeatureRequest(typename="ms:estacion")

Returns a URL with parameter concatenation error (&?):

http://visorgeo.ambientebogota.gov.co/map/?map=/geodata/mapserver/mapfiles/calidad_aire/estacion.map&?service=WFS&version=2.0.0&request=GetFeature&typenames=ms:estacion

and the request:

wfs2.getfeature(typename="ms:estacion").read()

with error:

'<HTML>\n<HEAD><TITLE>MapServer Message</TITLE></HEAD>\n<!-- MapServer version 7.2.0 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 -->\n<BODY BGCOLOR="#FFFFFF">\nmapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.\n</BODY></HTML>'

The suggested way to improve the use of parameters is to use the Python urlparse library.

#533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant