We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 267922a commit 43b6b3eCopy full SHA for 43b6b3e
1 file changed
src/spatialdata_plot/pl/utils.py
@@ -314,11 +314,13 @@ def get_point_bb(
314
315
# Split by Point and Polygon:
316
tmp_points = sdata.shapes[e_id][
317
- sdata.shapes[e_id]["geometry"].apply(lambda geom: geom.geom_type == "Point")
+ sdata.shapes[e_id]["geometry"].apply(
318
+ lambda geom: (geom.geom_type == "Point" and not geom.is_empty)
319
+ )
320
]
321
tmp_polygons = sdata.shapes[e_id][
322
sdata.shapes[e_id]["geometry"].apply(
- lambda geom: geom.geom_type in ["Polygon", "MultiPolygon"]
323
+ lambda geom: (geom.geom_type in ["Polygon", "MultiPolygon"] and not geom.is_empty)
324
)
325
326
0 commit comments