Sneriko commited on
Commit
cd9ae6e
·
verified ·
1 Parent(s): 5525d1a

Upload gota_hovratt_seg.py

Browse files
Files changed (1) hide show
  1. 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)