Skip to content
Snippets Groups Projects
Commit 5d48821e authored by anonymous's avatar anonymous
Browse files

fix multipolygon boundingbox

parent 6066213b
Branches
Tags
No related merge requests found
...@@ -71,6 +71,9 @@ def compute_bounding_box(coords): ...@@ -71,6 +71,9 @@ def compute_bounding_box(coords):
return None return None
coords = [c for sublist in coords for c in sublist] coords = [c for sublist in coords for c in sublist]
if type(coords[0][0]) == list:
## multipolygon
coords = [c for sublist in coords for c in sublist]
minx = min(coords, key = lambda t: t[0])[0] minx = min(coords, key = lambda t: t[0])[0]
maxx = max(coords, key = lambda t: t[0])[0] maxx = max(coords, key = lambda t: t[0])[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment