Hestia Earth Engine
Hestia's utilities to make queries to Earth Engine.
Getting Started
- Sign up for a Google Cloud Account
- Enable the Earth Engine API
- Create a Service Account with Earth Engine access
- Set the service account JSON credentials in the following file:
ee-credentials.json - Set the following environment variable:
# path to the ee-credentials.json file saved at previous step
EARTH_ENGINE_KEY_FILE=./ee-credentials.json
- The GADM assets are not shared publicly, as GADM cannot be redistributed. Download version 3.6 by level and upload each level to your own Earth Engine account, keeping the names
gadm36_0togadm36_5:
curl -O https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_shp.zip
unzip gadm36_levels_shp.zip -d gadm36_levels
# the Earth Engine CLI uploads from Google Cloud Storage
gsutil cp gadm36_levels/gadm36_* gs://<your-bucket>/gadm36/
for level in 0 1 2 3 4 5; do
earthengine upload table --asset_id=users/<your-account>/gadm36_$level gs://<your-bucket>/gadm36/gadm36_$level.shp
done
You can also upload each level from the Code Editor (Assets > New > Shape files), selecting its .shp, .shx, .dbf and .prj files. Then set the folder holding them:
# defaults to users/hestiaplatform
HESTIA_ASSETS=users/<your-account>
# optional, defaults to HESTIA_ASSETS
HESTIA_GADM_ASSETS=users/<your-account>
Install
- Install Python
3(we recommend using Python3.6minimum) - Install the module:
pip install hestia_earth.earth_engine
Usage
from hestia_earth.earth_engine import init_gee, run
# call this only once during a session
init_gee()
# fetch sand content for a specific location
data = {
"ee_type": "raster",
"collections": [
{
"collection": "users/hestiaplatform/T_SAND",
"fields": "first"
}
],
"coordinates": [
{
"latitude": -11.77,
"longitude": -45.7689
}
]
}
result = run(data)
assert result == [81]
Metadata
Release files for hestia-earth-earth-engine 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hestia_earth_earth_engine-0.6.2.tar.gz | 13.8 kB | Without provenance | Details for hestia_earth_earth_engine-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hestia_earth_earth_engine-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for hestia_earth_earth_engine-0.6.2-py3-none-any.whl |
Total release size: 29.4 kB
Release files / hestia_earth_earth_engine-0.6.2.tar.gz
| Download URL | hestia_earth_earth_engine-0.6.2.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5de3f96e63c189924bfe2ddbeb8069dd8adf206977b52bf32d2fcd3220754c76
|
|
BLAKE2b-256 checksum How to use checksums |
948f4b7521d0d22b033f1e9b7b74939751d8d0060f22a231b089af96fa34b543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / hestia_earth_earth_engine-0.6.2-py3-none-any.whl
| Download URL | hestia_earth_earth_engine-0.6.2-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c0001bcd53d7365f21858a54912ba1c6481eb0d1196590ef7855c75fc77373b
|
|
BLAKE2b-256 checksum How to use checksums |
e12153b2da1adb5892e232d39a31d057ca6757ca1dbf0adc47da969aa63f3f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for hestia-earth-earth-engine 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.