diff --git a/pynsee/geodata/get_geodata.py b/pynsee/geodata/get_geodata.py index 3ecf7692..b978d6c5 100644 --- a/pynsee/geodata/get_geodata.py +++ b/pynsee/geodata/get_geodata.py @@ -13,6 +13,7 @@ def get_geodata( update: bool = False, crs: Any = "EPSG:3857", constrain_area: Optional[GeoDataFrame] = None, + silent: bool = False, ) -> GeoFrDataFrame: """Get geographical data with identifier and from IGN API @@ -25,10 +26,17 @@ def get_geodata( constrain_area (:class:`~geopandas.GeoDataFrame`, optional): GeoDataFrame used to constrain the area of interest. Defaults to None. + silence (bool, optional): whether to print warnings or not. Defaults to False. + .. versionchanged: 0.2.0 Changed `polygon` and `crsPolygon` into a `constrain_area` :class:`~geopandas.GeoDataFrame`. + .. versionchanged: 0.3.0 + + Added silent parameter. + + Examples: >>> from pynsee.geodata import get_geodata_list, get_geodata >>> # @@ -40,14 +48,14 @@ def get_geodata( """ polygon = None - crsPolygon = "EPSG:4326" + crs_polygon = "EPSG:4326" if constrain_area is not None: if constrain_area.crs.to_string() not in ("EPSG:3857", "EPSG:4326"): constrain_area = constrain_area.to_crs("EPSG:4326") polygon = constrain_area.union_all() - crsPolygon = constrain_area.crs.to_string() + crs_polygon = constrain_area.crs.to_string() return _get_geodata( dataset_id=dataset_id, @@ -55,5 +63,6 @@ def get_geodata( crs=crs, ignore_error=False, polygon=polygon, - crs_polygon=crsPolygon, + crs_polygon=crs_polygon, + silent=silent, )