Sneriko commited on
Commit
95df724
·
verified ·
1 Parent(s): eb95e46

Upload jonkopings_radhusratts_och_magistrat_seg.py

Browse files
jonkopings_radhusratts_och_magistrat_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)