lonboard icon indicating copy to clipboard operation
lonboard copied to clipboard

Handle empty/missing geometries

Open kylebarron opened this issue 2 years ago • 2 comments

compute_view crashes when empty points exist (giving an infinite bounding box)

Maybe give a warning that null points exist, and then filter them out for creating a bbox?

kylebarron avatar Oct 25 '23 15:10 kylebarron

FWIW I solved this with:

# gdf is a dataframe with empty geometries
gdf = gdf[~gdf.is_empty]

geospatial-jeff avatar Oct 25 '23 19:10 geospatial-jeff

geopandas (WIP) creates a mask from shapely missing geometries. (Though maybe this is different from empty geometries)

https://github.com/geopandas/geopandas/pull/3219/files/fe43cbfbf3ffe79f3e01cc60b358320e8e57188e..e5cb82cdc7684b17717b5924cae9a8d3e6572aa6#diff-641f9c81b32c5622e37551d50ad3e74e58ae15c8378b610b55d9cc6160b23b60R83-R87

kylebarron avatar May 08 '24 13:05 kylebarron