File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import warnings
2
2
from collections import Counter
3
+ from collections .abc import Sequence
3
4
from dataclasses import dataclass
4
5
from datetime import date , datetime
5
6
from typing import Iterable
@@ -299,7 +300,7 @@ def _erase_elements_from(items: list, start_i: int) -> list:
299
300
300
301
301
302
def _create_unified_footprint (
302
- with_valid_geometries : list [ " TimePeriodOverview" ], footprint_tolerance : float
303
+ with_valid_geometries : Sequence [ TimePeriodOverview ], footprint_tolerance : float
303
304
) -> BaseGeometry | None :
304
305
"""
305
306
Union the given time period's footprints, trying to fix any invalid geometries.
@@ -319,7 +320,11 @@ def _create_unified_footprint(
319
320
try :
320
321
_LOG .warning ("summary.footprint.invalid_union" , exc_info = True )
321
322
geometry_union = shapely .ops .unary_union (
322
- [p .footprint_geometry .buffer (0.001 ) for p in with_valid_geometries ]
323
+ [
324
+ p .footprint_geometry .buffer (0.001 )
325
+ for p in with_valid_geometries
326
+ if p .footprint_geometry is not None
327
+ ]
323
328
)
324
329
except ValueError :
325
330
_LOG .warning ("summary.footprint.invalid_buffered_union" , exc_info = True )
You can’t perform that action at this time.
0 commit comments