Name | Sentinel-2-band-downloader JSON |
Version |
0.3.2
JSON |
| download |
home_page | None |
Summary | Utility for searching and downloading satellite images of Sentinel 2 |
upload_time | 2024-04-14 15:35:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Sentinel-2 Band Downloader
## Overview
Sentinel-2 Band Downloader is a simple Python package that allows users to download individual bands from Sentinel-2 satellite data.
This package simplifies the process of connecting to the Sentinel API, retrieving product information, creating output folders, obtaining band links, and downloading bands.
## Installation
### Using pip
You can install the package using `pip`:
```bash
pip install Sentinel_2_band_downloader
```
### Clone repository
git clone https://github.com/beatriznattrodtdavila/Sentinel_2_band_downloader.git
cd Sentinel_2_band_downloader
pip install -e .
## Example
```python
# Import the Sentinel2_Band_Downloader class
from scr.main.sentinel_2_band_downloader import Sentinel2_Band_Downloader
# Initialize the downloader with log and output paths (replace "/path/to/output")
downloader = Sentinel2_Band_Downloader(output_base_path="/path/to/output")
# Connect to the Copernicus API (replace 'your_username' and 'your_password')
access_token, refresh_token, dt_access_token = sentinel_downloader.connect_to_api(username, password)
# Construct a query for Sentinel-2 products
""" The parameters must be like:
footprint: str
The spatial geometry (POLYGON) of the area of interest.
start_date: str
The start date for the time range of interest in the format 'YYYY-MM-DD'.
end_date: str
The end date for the time range of interest in the format 'YYYY-MM-DD'.
cloud_cover_percentage: str
The maximum allowable cloud cover percentage.
type: str or list
Type of MSI to download
platform_name: str, optional
The name of the Sentinel platform (default: 'SENTINEL-2').
"""
query_params = downloader.construct_query(footprint="your_footprint", start_date="start_date",
end_date="end_date", cloud_cover_percentage="cloud_cover",
type="your_type", platform_name="your_platform_name")
# Write the bands to download
bands_dict = {"L1C":["B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B8A", "B09", "B10", "B11", "B12", "TCI"],
"L2A":{"10m": ["AOT", "B02", "B03", "B04", "B08", "TCI", "WVP"],
"20m": ["AOT","B01", "B02", "B03", "B04", "B05","B06", "B07", "B8A", "B11", "B12", "SCL", "TCI", "WVP"],
"60m": ["AOT","B01", "B02", "B03", "B04", "B05","B06", "B07", "B8A", "B09","B11", "B12", "SCL", "TCI", "WVP"]}}
# Download Sentinel2 Bands
downloader.download_sentinel2_bands(access_token, filter_list, bands_dict, dt_access_token, refresh_token, None)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "Sentinel-2-band-downloader",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Beatriz Nattrodt DAvila <beatriznattrodt@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ac/e9/839ab4f887adf4f97e73b40ec2a832feb13676807aa44e19f87a0cf00008/sentinel_2_band_downloader-0.3.2.tar.gz",
"platform": null,
"description": "# Sentinel-2 Band Downloader\n\n## Overview\n\nSentinel-2 Band Downloader is a simple Python package that allows users to download individual bands from Sentinel-2 satellite data.\n\nThis package simplifies the process of connecting to the Sentinel API, retrieving product information, creating output folders, obtaining band links, and downloading bands.\n\n## Installation\n\n### Using pip\n\nYou can install the package using `pip`:\n\n```bash\npip install Sentinel_2_band_downloader\n```\n\n### Clone repository\ngit clone https://github.com/beatriznattrodtdavila/Sentinel_2_band_downloader.git\ncd Sentinel_2_band_downloader\npip install -e .\n\n## Example\n\n```python\n# Import the Sentinel2_Band_Downloader class\nfrom scr.main.sentinel_2_band_downloader import Sentinel2_Band_Downloader\n\n# Initialize the downloader with log and output paths (replace \"/path/to/output\")\ndownloader = Sentinel2_Band_Downloader(output_base_path=\"/path/to/output\")\n\n# Connect to the Copernicus API (replace 'your_username' and 'your_password')\naccess_token, refresh_token, dt_access_token = sentinel_downloader.connect_to_api(username, password)\n\n# Construct a query for Sentinel-2 products\n\"\"\" The parameters must be like:\n footprint: str\n The spatial geometry (POLYGON) of the area of interest.\n start_date: str\n The start date for the time range of interest in the format 'YYYY-MM-DD'.\n end_date: str\n The end date for the time range of interest in the format 'YYYY-MM-DD'.\n cloud_cover_percentage: str\n The maximum allowable cloud cover percentage.\n type: str or list\n Type of MSI to download\n platform_name: str, optional\n The name of the Sentinel platform (default: 'SENTINEL-2').\n\"\"\"\nquery_params = downloader.construct_query(footprint=\"your_footprint\", start_date=\"start_date\", \n end_date=\"end_date\", cloud_cover_percentage=\"cloud_cover\", \n type=\"your_type\", platform_name=\"your_platform_name\")\n\n\n# Write the bands to download\nbands_dict = {\"L1C\":[\"B01\", \"B02\", \"B03\", \"B04\", \"B05\", \"B06\", \"B07\", \"B08\", \"B8A\", \"B09\", \"B10\", \"B11\", \"B12\", \"TCI\"],\n \"L2A\":{\"10m\": [\"AOT\", \"B02\", \"B03\", \"B04\", \"B08\", \"TCI\", \"WVP\"],\n \"20m\": [\"AOT\",\"B01\", \"B02\", \"B03\", \"B04\", \"B05\",\"B06\", \"B07\", \"B8A\", \"B11\", \"B12\", \"SCL\", \"TCI\", \"WVP\"],\n \"60m\": [\"AOT\",\"B01\", \"B02\", \"B03\", \"B04\", \"B05\",\"B06\", \"B07\", \"B8A\", \"B09\",\"B11\", \"B12\", \"SCL\", \"TCI\", \"WVP\"]}}\n\n# Download Sentinel2 Bands\ndownloader.download_sentinel2_bands(access_token, filter_list, bands_dict, dt_access_token, refresh_token, None)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Utility for searching and downloading satellite images of Sentinel 2",
"version": "0.3.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "360f00cc576a532eebd9e701c823da16a467cae3fbe44521044bd36783258560",
"md5": "106a058f8e9d297f4f40a7bde75ed58c",
"sha256": "f68011369f0f6462956c98f65c57bc43a6596b91acdae86361bd5e8054b875e8"
},
"downloads": -1,
"filename": "Sentinel_2_band_downloader-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "106a058f8e9d297f4f40a7bde75ed58c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14414,
"upload_time": "2024-04-14T15:35:29",
"upload_time_iso_8601": "2024-04-14T15:35:29.552222Z",
"url": "https://files.pythonhosted.org/packages/36/0f/00cc576a532eebd9e701c823da16a467cae3fbe44521044bd36783258560/Sentinel_2_band_downloader-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ace9839ab4f887adf4f97e73b40ec2a832feb13676807aa44e19f87a0cf00008",
"md5": "8072dd6a25445b002ee2f95bec27df7d",
"sha256": "13ec42bb4dd792599c47e4516b402801fae919509affb03545a3fc8f5260b5cf"
},
"downloads": -1,
"filename": "sentinel_2_band_downloader-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "8072dd6a25445b002ee2f95bec27df7d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 13823,
"upload_time": "2024-04-14T15:35:31",
"upload_time_iso_8601": "2024-04-14T15:35:31.518820Z",
"url": "https://files.pythonhosted.org/packages/ac/e9/839ab4f887adf4f97e73b40ec2a832feb13676807aa44e19f87a0cf00008/sentinel_2_band_downloader-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-14 15:35:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sentinel-2-band-downloader"
}