diff --git a/quackosm/osm_extracts/__init__.py b/quackosm/osm_extracts/__init__.py index cc969cf..dbd25a4 100644 --- a/quackosm/osm_extracts/__init__.py +++ b/quackosm/osm_extracts/__init__.py @@ -342,7 +342,7 @@ def find_smallest_containing_bbbike_extracts( ) -def find_smallest_containing_extract( +def find_smallest_containing_extracts( geometry: Union[BaseGeometry, BaseMultipartGeometry], source: Union[OsmExtractSource, str], allow_uncovered_geometry: bool = False, diff --git a/quackosm/pbf_file_reader.py b/quackosm/pbf_file_reader.py index 466e901..a81816f 100644 --- a/quackosm/pbf_file_reader.py +++ b/quackosm/pbf_file_reader.py @@ -59,7 +59,7 @@ from quackosm.osm_extracts import ( OsmExtractSource, download_extracts_pbf_files, - find_smallest_containing_extract, + find_smallest_containing_extracts, ) __all__ = [ @@ -572,7 +572,7 @@ def convert_geometry_to_parquet( ) return result_file_path.with_suffix(".geoparquet") - matching_extracts = find_smallest_containing_extract( + matching_extracts = find_smallest_containing_extracts( self.geometry_filter, self.osm_extract_source, allow_uncovered_geometry=self.allow_uncovered_geometry, diff --git a/tests/base/test_osm_extracts.py b/tests/base/test_osm_extracts.py index e118fda..f1022e9 100644 --- a/tests/base/test_osm_extracts.py +++ b/tests/base/test_osm_extracts.py @@ -22,7 +22,7 @@ from quackosm.osm_extracts import ( OsmExtractSource, display_available_extracts, - find_smallest_containing_extract, + find_smallest_containing_extracts, find_smallest_containing_extracts_total, get_extract_by_query, ) @@ -127,7 +127,7 @@ def test_wrong_osm_extract_source(): # type: ignore ) # type: ignore def test_single_smallest_extract(source: str, geometry: BaseGeometry, expected_extract_id: str): """Test if extracts matching works correctly for geometries within borders.""" - extracts = find_smallest_containing_extract(geometry, source) + extracts = find_smallest_containing_extracts(geometry, source) assert len(extracts) == 1 assert extracts[0].id == expected_extract_id, f"{extracts[0].id} vs {expected_extract_id}" @@ -153,7 +153,7 @@ def test_multiple_smallest_extracts( source: str, geometry: BaseGeometry, expected_extract_file_names: list[str] ): """Test if extracts matching works correctly for geometries between borders.""" - extracts = find_smallest_containing_extract(geometry, source) + extracts = find_smallest_containing_extracts(geometry, source) assert len(extracts) == len(expected_extract_file_names) ut.assertListEqual([extract.file_name for extract in extracts], expected_extract_file_names)