Download Sentinel-2 data from Microsoft Planetary Computer
Project description
sen2p
sen2p is a lightweight Python library to download Sentinel-2 imagery from Microsoft Planetary Computer.
🌍 Features
- 🔍 Search Sentinel-2 data by date and location (point or shapefile)
- 🛰️ Download multiple bands and/or selected bands
- 🗂️ Stack and preprocess bands into a single image
- 🐍 Easy to integrate with geospatial workflows
📦 Installation
pip install sen2p
Usage
Using a Point Location [lon, lat]
from sen2p import download
location = [172.1, -43.5]
results = download(
start_date="2023-06-01",
end_date="2023-06-10",
location=location,
bands=["B02", "B03", "B04"],
output_dir="test_outputs",
)
for r in results:
print("Downloaded:", r)
Using a bounding box
from sen2p import download
bbox = [172.0, -43.6, 172.5, -43.3]
results = download(
start_date="2023-06-01",
end_date="2023-06-10",
location=bbox,
bands=["B02", "B03", "B04"],
output_dir="test_outputs",
)
Using a Polygon Shapefile
from sen2p import download
# Path to your shapefile
shapefile_path = "Site.shp" # Update with your actual shapefile path
# Call the function
results = download(
start_date="2023-06-01",
end_date="2023-06-30",
location=shapefile_path,
bands=["B02", "B03", "B04"],
output_dir="test_output",
)
Show metadata
from sen2p import show_meta
show_meta("S2B_..._merged.tif")
🔖 License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sen2p-0.0.4.tar.gz
(8.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sen2p-0.0.4-py3-none-any.whl
(7.3 kB
view details)
File details
Details for the file sen2p-0.0.4.tar.gz.
File metadata
- Download URL: sen2p-0.0.4.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5732c7b343c17b93c16463826f2f3b1b6978b2ef05a3af38f41e7fda64985c0a
|
|
| MD5 |
e75cefda13244cfcea772b11cbb33dbf
|
|
| BLAKE2b-256 |
3ba2d919cedb3446d592f057e50279b159b2f726511da7a8f7f75e265bb45ffe
|
File details
Details for the file sen2p-0.0.4-py3-none-any.whl.
File metadata
- Download URL: sen2p-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e26aa6cc33af48295d5879f2d6db560645e1a41f9659f6bd9a78a61038656bb
|
|
| MD5 |
6304d93639cd4b2b9209a031190993c7
|
|
| BLAKE2b-256 |
c82324ffd4923f8e0e79ae877a8f6684fb065f9de188c79621d7173fe3c401b2
|