data_downloader.services.ASFScenesABC#
- class data_downloader.services.ASFScenesABC(geojson: dict)#
Abstract Base Class handling ASF scenes.
- __init__(geojson: dict) None#
Initialize ASFScenes with given GeoJSON.
Methods
__init__(geojson)Initialize ASFScenes with given GeoJSON.
download(folder[, urls])Download Scenes to the specified folder.
save_boundaries(folder[, filename])Save the boundaries of Scenes to a GeoJSON file.
to_gdf([crs])Convert the GeoJSON to a geopandas.GeoDataFrame.
Attributes
Boundary file name for saving downloaded scenes.
geopandas.GeoDataFrame representation of Scenes.
GeoJSON representation of Scenes.
String representation of the ASFScenes instance.
String representation of the ASFScenes instance.
List of URLs for downloading Scenes.
- __init__(geojson: dict) None#
Initialize ASFScenes with given GeoJSON.
- property repr: str#
String representation of the ASFScenes instance.
- property scenes_repr: str#
String representation of the ASFScenes instance.
- property boundary_file: str#
Boundary file name for saving downloaded scenes.
- property geojson: dict#
GeoJSON representation of Scenes.
- property gdf: GeoDataFrame#
geopandas.GeoDataFrame representation of Scenes.
- property url: Series#
List of URLs for downloading Scenes.
- to_gdf(crs: int | str | None = None) GeoDataFrame#
Convert the GeoJSON to a geopandas.GeoDataFrame.
- Parameters:
crs (int, str, or None, optional) – The CRS to set for the GeoDataFrame. If None, the CRS will not be set. Default is None.
- Returns:
The GeoDataFrame representation of the Scenes.
- Return type:
gpd.GeoDataFrame
- save_boundaries(folder: PathLike, filename: str | None = None) None#
Save the boundaries of Scenes to a GeoJSON file.
- Parameters:
folder (PathLike) – The folder where the GeoJSON file will be saved.
filename (str, optional) – The name of the output GeoJSON file. If None, it will use the default boundary file name. Default is None.
- download(folder: PathLike, urls: list[str] | None = None) None#
Download Scenes to the specified folder.
- ..hint::
The data will be saved in a subfolder named frame_{frame}_path_{path}. You can specify a parent folder, and the subfolder will be created automatically.
- Parameters:
folder (PathLike) – The folder where the Scenes will be saved.
urls (list[str] or None, optional) – List of URLs to download. If None, all URLs will be used.