OWSLib icon indicating copy to clipboard operation
OWSLib copied to clipboard

Bug in bounding box creation for WMS 1.1.1

Open om-henners opened this issue 2 years ago • 0 comments

Currently this line causes an issue when building the URL parameter for the bounding box in WMS 1.1.1

https://github.com/geopython/OWSLib/blob/bc88ee1a6509746cff1cccfbad6e6501bae4c256/owslib/map/wms111.py#L175

and likewise in WMS 1.3.0, although only when the projection for the bounding box is in a non-geographic projection (because above if in a geographic projection the bbox is remapped to reverse the axis).

https://github.com/geopython/OWSLib/blob/bc88ee1a6509746cff1cccfbad6e6501bae4c256/owslib/map/wms130.py#L186

The result is that it adds quotes into the parameter string which causes downstream issues (or at least does in geoserver). For example a bounding box of

bbox = (0, 0, 1, 1, 'EPSG:28356')

is reformatted as 0,0,1,1,'EPSG:28356' when the server is expecting 0,0,1,1,EPSG:28356.

The solution is to use str instead of repr for the join.

om-henners avatar Jun 23 '23 02:06 om-henners