Skip to content

Commit 4d7790b

Browse files
committed
fix: remove unnecessary check for empty dataframe
1 parent 41d6413 commit 4d7790b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

mapswipe_workers/mapswipe_workers/utils/process_mapillary.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,9 @@ def get_image_metadata(
224224
aoi_polygon = geojson_to_polygon(aoi_geojson)
225225
downloaded_metadata = coordinate_download(aoi_polygon, level, kwargs)
226226
if downloaded_metadata.empty or downloaded_metadata.isna().all().all():
227-
raise ValueError("No Mapillary Features in the AoI.")
228-
229-
if (
230-
downloaded_metadata is None
231-
or downloaded_metadata.empty
232-
or downloaded_metadata.isna().all().all()
233-
):
234-
raise ValueError("No Mapillary Features in the AoI match the filter criteria.")
227+
raise ValueError(
228+
"No Mapillary Features in the AoI or no Features match the filter criteria."
229+
)
235230

236231
if sampling_threshold is not None:
237232
downloaded_metadata = spatial_sampling(downloaded_metadata, sampling_threshold)

0 commit comments

Comments
 (0)