Extract Sentinel-1 GRD time-series images over a given area from google earth engine
Project description
GEE SAR Fetcher
An easy-to-use Python library to download SAR GRD imagery from Google Earth Engine.
Additions with version 0.3.3
The development of version 0.3.3 added two new functionalities to the library:
- the ability to select the orbit number of the downloaded temporal stack. It can directly be supplied by the user, or the said user can supply a keyword "min" or "max" and the adequate orbit number will automatically be extracted, given the orbit type and coordinates.
- the ability to retrieve metadata from the downloaded stack, one per temporal image.
Introduction
Access Google's multi-petabytes of SAR Imagery data from your python code with no dimension restraint. Simply supply coordinates, a time interval and obtain a stack of Sentinel-1 preprocessed PolSAR images. This enables quick data analysis of GRD images to get better insights of the temporal dimension in SAR data without having to bother with essential but potentially time-consuming steps such as coregistration or calibration.
Compatible with python 3.
Usage
Retrieve multitemporal SAR Images
The main function of this library is the fetch
function:
from geesarfetcher import fetch
from datetime import datetime, timedelta
d = fetch(
top_left=[-116.17556985040491, 60.527371254744246],
bottom_right=[-116.1364310564596, 60.54425859382555],
start_date=datetime(year=2021, month=5, day=20) - timedelta(days=365),
end_date=datetime(year=2021, month=5, day=20),
ascending=False,
scale=10,
orbit_number="max",
verbose=2
) # returns a dictionnary with access to the data through the 'stack' keyword and to its timestamps through the 'timestamps' keyword
Retrieve multitemporal SAR Image and saves it as geocoded TIFFs
The fetch method loads the full data stack in memory. For large areas or long time interval, using the fetch_and_save
alternative, that progressively saves SAR Images as GeoTIFF. They can then be opened in any QGIS-like software as a normal geocoded .tiff file. For more info, see link...
from geesarfetcher import fetch_and_save
from datetime import datetime, timedelta
fetch_and_save(
save_dir = ".",
top_left = [-104.77431630331856, 41.729889598264826],
bottom_right = [-104.65140675742012, 41.81515375846025],
start_date = datetime(2019, 6, 1),
end_date = datetime(2019, 6, 3),
ascending = False,
scale = 10,
orbit_number="max",
n_jobs = 8,
verbose = 2
)
Retrieve a single point SAR temporal signature
To fetch over a single point, the process is similar to the difference that we use another function, called fetch_point
and only provide a single coordinates tuple rather than either two or 5 tuples for the area query.
from geesarfetcher import fetch_point
from datetime import date, timedelta
d = fetch_point(
coords = [-104.88572453696113, 41.884778748257574],
start_date = date.today()-timedelta(days=15),
end_date = date.today(),
ascending = False,
scale = 10,
orbit_number="max",
verbose = 2
)
Installation
Access to Google Earth Engine is conditioned by the obtention of a GEE account. Once created, you can install the geesarfetcher API and register an identifying token for your Python working environment using the following commands:
pip install geesarfetcher
earthengine authenticate
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geesarfetcher-0.3.8.tar.gz
.
File metadata
- Download URL: geesarfetcher-0.3.8.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a922558af9b08c1cd592c933ed22749c5163d37f5225a3b2e2856653107061 |
|
MD5 | b450c68e7df929c413d5dea51628a94a |
|
BLAKE2b-256 | 23f71ee4d003968bc481f41e05afc0450b9ef89f977bd212dae8f7a0ecbfbf5c |
File details
Details for the file geesarfetcher-0.3.8-py3-none-any.whl
.
File metadata
- Download URL: geesarfetcher-0.3.8-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df5e7a68a9e7a4bbe7bb41e3f33f6b3ddf05bdd2e62a4f7dfdeafcf6d0938a21 |
|
MD5 | 17dbf9a494f9cfa16b1f73f87322266e |
|
BLAKE2b-256 | ddfc2b390e9bc1a1034dbd0d1c562d2b5608677cf98500685095a93faa881390 |