pixcdust.downloaders.hydroweb_next

Downloaders for hydroweb.next. Require an API-Key see HELP_MESSAGE.

Attributes

HELP_MESSAGE

Classes

Downloader

Downloader class for hydroweb.next STAC API.

PixCDownloader

Downloader for SWOT Pixel Cloud files from hydroweb.next.

Module Contents

pixcdust.downloaders.hydroweb_next.HELP_MESSAGE = Multiline-String[source]
Show Value
"""
Download products from hydroweb.next (https://hydroweb.next.theia-land.fr)
using EODAG (https://github.com/CS-SI/eodag)

Follow these steps:
1a. Generate an API-Key from hydroweb.next portal in your user settings
1b. Carefully store your API-Key
- either in your eodag configuration file (usually ~/.config/eodag/eodag.yml,
automatically generated the first time you use eodag) in
auth/credentials/apikey="PLEASE_CHANGE_ME"
- or in an environment variable
`export EODAG__HYDROWEB_NEXT__AUTH__CREDENTIALS__APIKEY="PLEASE_CHANGE_ME"`
2. You can change download directory by modifying the variable path_out.
By default, current path is used.

For more information, please refer to EODAG Documentation
https://eodag.readthedocs.io
"""
class pixcdust.downloaders.hydroweb_next.Downloader(collection_name: str, geometry: str | list[str] | geopandas.GeoDataFrame | None = (None,), dates: Tuple[datetime.date, datetime.date] | None = None, path_download: str | pathlib.Path = '/tmp/hydroweb_next', verbose: int | None = 0)[source]

Downloader class for hydroweb.next STAC API.

Attributes:

collection_name: Name of the collection in hydroweb.next catalog geometry: Geometry used as search criteria. Defaults to None. dates: Minimum and maximum dates to be used as search criteria. Defaults to None. path_download: Download path. Defaults to “/tmp/hydroweb_next”. query_args: Query filters to request from hydroweb.next generated from parameters. search_results: Products founds matching the query_args (and downloaded). dag: Hydroweb.next API

PROVIDER = 'hydroweb_next'[source]
collection_name[source]
geometry = (None,)[source]
dates = None[source]
path_download = ''[source]
query_args[source]
search_results: List[eodag.SearchResult] = [][source]
dag[source]
static _explode_simplify_geometry(geometry: geopandas.GeoDataFrame, tolerance: float | None = None) geopandas.GeoDataFrame[source]

this method explodes geodataframe containing multipolygons into single polygons. It allows to simplify the polygons in order to descrease their number of nodes. It also checks the number of nodes in the polygon in case it goes over a threshold

Args:
geometry (gpd.GeoDataFrame): a geodataframe containing search

polygons of multipolygons

tolerance (float | None, optional): Maximum tolerance of the geometry simplification.

Defaults to None. All parts of a simplified geometry will be no more than tolerance distance from the original. It has the same units as the coordinate reference system of the GeoSeries.

Raises:
AttributeError: if the number of nodes in a single polygon

is over 200

Returns:
gpd.GeoDataFrame: exploded geodataframe with simplified polygons

if required

__check_collection_name() None[source]
search_download(tolerance: float | None = None) None[source]

Search files according to the query and download them.

Args:
tolerance: Maximum tolerance of the geometry simplification.

Cf self._explode_simplify_geometry.

class pixcdust.downloaders.hydroweb_next.PixCDownloader(*args, **kwargs)[source]

Bases: Downloader

Downloader for SWOT Pixel Cloud files from hydroweb.next.