Upload gota_hovratt_seg.py
Browse files- gota_hovratt_seg.py +1 -1
gota_hovratt_seg.py
CHANGED
@@ -469,7 +469,7 @@ class HTRDataset(GeneratorBasedBuilder):
|
|
469 |
return list(intersection.exterior.coords)
|
470 |
elif intersection.geom_type == "MultiPolygon":
|
471 |
# If the result is a MultiPolygon, take the largest by area (or another heuristic)
|
472 |
-
largest_polygon = max(intersection, key=lambda p: p.area)
|
473 |
return list(largest_polygon.exterior.coords)
|
474 |
elif intersection.geom_type == "LineString":
|
475 |
return list(intersection.coords)
|
|
|
469 |
return list(intersection.exterior.coords)
|
470 |
elif intersection.geom_type == "MultiPolygon":
|
471 |
# If the result is a MultiPolygon, take the largest by area (or another heuristic)
|
472 |
+
largest_polygon = max(intersection.geoms, key=lambda p: p.area)
|
473 |
return list(largest_polygon.exterior.coords)
|
474 |
elif intersection.geom_type == "LineString":
|
475 |
return list(intersection.coords)
|