-
-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Labels
Milestone
Description
Description
pygeoapi is not respecting the crs parameter for OGC API - Maps.
According to the spec, this parameter should be expressed as an uri, and would enable requesting a map in a given crs.
In the source code there seems to be an intention to support WGS84 and WebMercator, and to support other formats than uris, but the code on maps.py and wms_facade.py is not letting that happen. The result is that the crs is always defaulting to WGS84.
Steps to Reproduce
- Request a map in WGS84, or not passing a crs parameter (in which case it will default to EPSG:4326):
https://demo.pygeoapi.io/master/collections/mapserver_world_map/map?f=png https://demo.pygeoapi.io/master/collections/mapserver_world_map/mapcrs=http://www.opengis.net/def/crs/EPSG/0/4326&f=png - Request a map in WebMercator, either using the uri or the EPSG code, directly.
https://demo.pygeoapi.io/master/collections/mapserver_world_map/map?crs=http://www.opengis.net/def/crs/EPSG/0/3857&f=png
https://demo.pygeoapi.io/master/collections/mapserver_world_map/map?crs=3857&f=png
Expected behavior
The first and second maps should be different. Instead, we are always given a map in WGS84.
Screenshots/Tracebacks
WGS84 request:
Web Mercator request:
Environment
- OS: Ubuntu 24.04.4 LTS
- Python version: 3.12.3
- pygeoapi version: master
Reactions are currently unavailable