From the OAMaps swagger the bbox-crs is handled as string causing a KeyError
Description
When using the OAMaps swagger interface when passing the bbox-crs this is handled as a string causing a KeyError.
If I add to the code https://github.com/geopython/pygeoapi/blob/master/pygeoapi/provider/wms_facade.py#L44-L47
like this
CRS_CODES = {
4326: 'EPSG:4326',
'4326': 'EPSG:4326',
'http://www.opengis.net/def/crs/EPSG/0/3857': 'EPSG:3857'
}
I guess this is not the way to do it, but somehow the crs is turn into a string, but in the wms_facade I think it is needed as a int or at least a number.
Screenshots/Tracebacks
.1 - - [13/Jan/2023 10:22:59] "GET /collections/mapserver_metno/map?datetime=2023-01-11T06%3A34%3A20Z&transparent=true&bbox-crs=4326&f=png HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 2548, in __call__
return self.wsgi_app(environ, start_response)
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/home/trygveas/miniconda3/envs/pygeoapi/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/trygveas/Git/pygeoapi/pygeoapi/flask_app.py", line 319, in collection_map
headers, status_code, content = api_.get_collection_map(
File "/home/trygveas/Git/pygeoapi/pygeoapi/api.py", line 195, in inner
headers, status, content = func(*args, **kwargs)
File "/home/trygveas/Git/pygeoapi/pygeoapi/api.py", line 177, in inner
return func(cls, req_out, *args[2:])
File "/home/trygveas/Git/pygeoapi/pygeoapi/api.py", line 2923, in get_collection_map
data = p.query(**query_args)
File "/home/trygveas/Git/pygeoapi/pygeoapi/provider/wms_facade.py", line 122, in query
'crs': CRS_CODES[crs],
KeyError: '4326'
Environment
- OS: ubuntu bionic
- Python version: python3.9
- pygeoapi version: master
As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.
As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.