Skip to content

Commit 117c3d2

Browse files
Update _compress_providers to fix a bug on bounds definition.
1 parent 96305d1 commit 117c3d2

File tree

2 files changed

+1049
-1055
lines changed

2 files changed

+1049
-1055
lines changed

provider_sources/_compress_providers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@
123123
max_zoom = int((TileMatrixSetLimits[-1]["TileMatrix"]))
124124
TileMatrixSet = layer["TileMatrixSetLink"]["TileMatrixSet"]
125125
format = layer["Format"]
126-
bounding_lower_corner = layer["ows:WGS84BoundingBox"]["ows:LowerCorner"]
127-
bounding_upper_corner = layer["ows:WGS84BoundingBox"]["ows:UpperCorner"]
128-
lower1, lower2 = bounding_lower_corner.split(" ")
129-
upper1, upper2 = bounding_upper_corner.split(" ")
130-
bounds = [[float(lower1), float(lower2)], [float(upper1), float(upper2)]]
126+
bounding_lowerleft_corner = layer["ows:WGS84BoundingBox"]["ows:LowerCorner"]# given with lon/lat order
127+
bounding_upperright_corner = layer["ows:WGS84BoundingBox"]["ows:UpperCorner"]# given with lon/lat order
128+
lowerleft_corner_lon, lowerleft_corner_lat = bounding_lowerleft_corner.split(" ")
129+
upperright_corner_lon, upperright_corner_lat = bounding_upperright_corner.split(" ")
130+
bounds = [[float(lowerleft_corner_lat), float(lowerleft_corner_lon)], [float(upperright_corner_lat), float(upperright_corner_lon)]]
131131

132132
if format == "application/x-protobuf":
133133
pass

0 commit comments

Comments
 (0)