geopython / OWSLib

OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models.
https://owslib.readthedocs.io
BSD 3-Clause "New" or "Revised" License
390 stars 276 forks source link

WMS GetFeatureInfo queries getting constructed incorrectly in 0.30.0 #922

Closed SpacemanPaul closed 6 months ago

SpacemanPaul commented 6 months ago

In 0.29.3 the following code snippet:

wms = WebMapService(url=server.url + "/wms", version="1.3.0", timeout=300)
response = wms.getfeatureinfo(
            layers=[test_layer_name],
            srs="EPSG:4326",
            bbox=pytest.helpers.enclosed_bbox(bbox),
            size=(256, 256),
            format="image/png",
            query_layers=[test_layer_name],
            info_format="application/json",
            xy=(250, 250),
)

returns a valid WMS GetFeatureInfo request:

http://127.0.0.1:8000/wms?service=WMS&version=1.3.0&request=GetFeatureInfo&layers=s2_l2a&styles=&width=256&height=256&crs=EPSG%3A4326&bbox=-14.197594751385514%2C124.2987372360981%2C-13.915985504698986%2C124.5873847057679&format=image%2Fpng&transparent=FALSE&exceptions=XML&bgcolor=0xFFFFFF&query_layers=s2_l2a&i=250&j=250&info_format=application%2Fjson&feature_count=20

In 0.30.0, the following invalid request is generated:

http://127.0.0.1:8000/wms?service=WMS&version=1.3.0&request=GetFeatureInfo&layers=s2_l2a&styles=&width=256&height=256&crs=EPSG:4326&bbox=-14.197594751385514,124.2987

(appears to be truncated?)

SpacemanPaul commented 6 months ago

Ugh!!! Nevermind. PEBKAC.