Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -91,8 +91,11 @@ def get_coordinates(location):
|
|
91 |
coordinates = json_content[0]['geojson']['coordinates'][0]
|
92 |
elif json_content[0]['geojson']['type'] == 'Point':
|
93 |
coordinates = json_content[0]['geojson']['coordinates']
|
|
|
|
|
94 |
else:
|
95 |
-
|
|
|
96 |
centroid = (float(json_content[0]['lon']), float(json_content[0]['lat']))
|
97 |
return (coordinates, centroid)
|
98 |
|
|
|
91 |
coordinates = json_content[0]['geojson']['coordinates'][0]
|
92 |
elif json_content[0]['geojson']['type'] == 'Point':
|
93 |
coordinates = json_content[0]['geojson']['coordinates']
|
94 |
+
elif json_content[0]['geojson']['type'] == 'MultiPolygon':
|
95 |
+
coordinates = json_content[0]['geojson']['coordinates'][0][0]
|
96 |
else:
|
97 |
+
coordinates = get_inner(json_content[0]['geojson']['coordinates'])
|
98 |
+
print(json_content[0]['geojson']['type'], 'refref')
|
99 |
centroid = (float(json_content[0]['lon']), float(json_content[0]['lat']))
|
100 |
return (coordinates, centroid)
|
101 |
|