Spaces:
Runtime error
Runtime error
Suchinthana
commited on
Commit
Β·
6aa54a4
1
Parent(s):
43f3bfb
recreate and apply
Browse files
app.py
CHANGED
|
@@ -203,7 +203,8 @@ def generate_static_map(geojson_data, invisible=False):
|
|
| 203 |
elif geom_type in ["Polygon", "MultiPolygon"]:
|
| 204 |
# Sort coordinates for simple polygons
|
| 205 |
if geom_type == "Polygon":
|
| 206 |
-
|
|
|
|
| 207 |
coords = feature["geometry"]["coordinates"]
|
| 208 |
logger.info(f"coords: {coords}")
|
| 209 |
for polygon in coords:
|
|
|
|
| 203 |
elif geom_type in ["Polygon", "MultiPolygon"]:
|
| 204 |
# Sort coordinates for simple polygons
|
| 205 |
if geom_type == "Polygon":
|
| 206 |
+
oredered_geojson = sort_coordinates_for_simple_polygon(geojson_data)
|
| 207 |
+
feature["geometry"]["coordinates"] = oredered_geojson["features"][0]["geometry"]["coordinates"]
|
| 208 |
coords = feature["geometry"]["coordinates"]
|
| 209 |
logger.info(f"coords: {coords}")
|
| 210 |
for polygon in coords:
|