Skip to content

Commit 1b3ddc8

Browse files
committed
Change bounds wms request
1 parent 92143d9 commit 1b3ddc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

label_maker/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def get_tile_wms(tile, imagery, folder, imagery_offset):
9393
Converts the tile boundaries to the spatial reference system (SRS) specified
9494
by the WMS query parameter.
9595
"""
96-
query_dict = parse_qs(imagery)
96+
query_dict = parse_qs(imagery.lower())
9797
image_format = query_dict['format'][0].split('/')[1]
9898
wms_srs = query_dict['srs'][0]
9999

@@ -102,9 +102,9 @@ def get_tile_wms(tile, imagery, folder, imagery_offset):
102102
p2 = Proj({'init': wms_srs})
103103

104104
# project tile boundaries from lat/lng to WMS SRS
105-
tile_ul_proj = transform(p1, p2, bound.west, bound.north)
106-
tile_lr_proj = transform(p1, p2, bound.east, bound.south)
107-
bbox = tile_lr_proj + tile_ul_proj
105+
tile_ll_proj = transform(p1, p2, bound.west, bound.south)
106+
tile_ur_proj = transform(p1, p2, bound.east, bound.north)
107+
bbox = tile_ll_proj + tile_ur_proj
108108

109109
wms_url = imagery.replace('{bbox}', ','.join([str(b) for b in bbox]))
110110
r = requests.get(wms_url)

0 commit comments

Comments
 (0)