datensee 0.1.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datensee-0.1.0a1/PKG-INFO +121 -0
- datensee-0.1.0a1/README.md +88 -0
- datensee-0.1.0a1/pyproject.toml +84 -0
- datensee-0.1.0a1/pyproject.toml.orig +69 -0
- datensee-0.1.0a1/src/datensee/__init__.py +6 -0
- datensee-0.1.0a1/src/datensee/_version.py +17 -0
- datensee-0.1.0a1/src/datensee/api.py +1144 -0
- datensee-0.1.0a1/src/datensee/auth.py +59 -0
- datensee-0.1.0a1/src/datensee/config.py +333 -0
- datensee-0.1.0a1/src/datensee/cost.py +297 -0
- datensee-0.1.0a1/src/datensee/data/demo_expression.json +96 -0
- datensee-0.1.0a1/src/datensee/data/demo_region.json +12 -0
- datensee-0.1.0a1/src/datensee/display.py +142 -0
- datensee-0.1.0a1/src/datensee/jar.py +285 -0
- datensee-0.1.0a1/src/datensee/main.py +860 -0
- datensee-0.1.0a1/src/datensee/meta.py +233 -0
- datensee-0.1.0a1/src/datensee/notebook.py +327 -0
- datensee-0.1.0a1/src/datensee/pinning.py +196 -0
- datensee-0.1.0a1/src/datensee/pixel/__init__.py +17 -0
- datensee-0.1.0a1/src/datensee/pixel/config.py +220 -0
- datensee-0.1.0a1/src/datensee/pixel/retry.py +307 -0
- datensee-0.1.0a1/src/datensee/pixel/tiling.py +249 -0
- datensee-0.1.0a1/src/datensee/pixel/validation/__init__.py +284 -0
- datensee-0.1.0a1/src/datensee/pixel/validation/pixels.py +249 -0
- datensee-0.1.0a1/src/datensee/pixel/validation/units.py +150 -0
- datensee-0.1.0a1/src/datensee/py.typed +0 -0
- datensee-0.1.0a1/src/datensee/status.py +556 -0
- datensee-0.1.0a1/src/datensee/submit.py +612 -0
- datensee-0.1.0a1/src/datensee/template.py +38 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: datensee
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: DatensEE: Parallelize Google Earth Engine exports via Cloud Dataflow
|
|
5
|
+
Keywords: earth-engine,gee,dataflow,geotiff,cog,remote-sensing
|
|
6
|
+
Author: DatensEE Contributors
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Dist: typer>=0.12
|
|
18
|
+
Requires-Dist: pydantic>=2.0
|
|
19
|
+
Requires-Dist: httpx>=0.27
|
|
20
|
+
Requires-Dist: rich>=13.0
|
|
21
|
+
Requires-Dist: pyproj>=3.6
|
|
22
|
+
Requires-Dist: shapely>=2.0
|
|
23
|
+
Requires-Dist: google-auth>=2.0
|
|
24
|
+
Requires-Dist: google-cloud-storage>=2.0
|
|
25
|
+
Requires-Dist: rasterio>=1.3 ; extra == 'validation'
|
|
26
|
+
Requires-Python: >=3.12
|
|
27
|
+
Project-URL: Homepage, https://github.com/michaelfdewitt/datensee
|
|
28
|
+
Project-URL: Repository, https://github.com/michaelfdewitt/datensee
|
|
29
|
+
Project-URL: Issues, https://github.com/michaelfdewitt/datensee/issues
|
|
30
|
+
Project-URL: Changelog, https://github.com/michaelfdewitt/datensee/releases
|
|
31
|
+
Provides-Extra: validation
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# DatensEE
|
|
35
|
+
|
|
36
|
+
**Massively parallel Earth Engine exports via Cloud Dataflow.**
|
|
37
|
+
|
|
38
|
+
DatensEE takes the computation you already wrote in Earth Engine and runs it at
|
|
39
|
+
continental scale. You bring the expression, the region, and the scale — DatensEE
|
|
40
|
+
handles tiling, parallel fetching across thousands of Dataflow workers, and
|
|
41
|
+
assembly into Cloud Optimized GeoTIFFs on GCS.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install datensee
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
No `earthengine-api` dependency, no Java toolchain. Cloud exports launch a
|
|
48
|
+
prebuilt Dataflow Flex Template; the local runner (small regions, debugging)
|
|
49
|
+
fetches a prebuilt pipeline JAR on first use.
|
|
50
|
+
|
|
51
|
+
## Drop-in replacement for `Export.image.toCloudStorage`
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
import ee, datensee
|
|
55
|
+
ee.Initialize()
|
|
56
|
+
|
|
57
|
+
image = (ee.ImageCollection('LANDSAT/LC09/C02/T1_L2')
|
|
58
|
+
.filterDate('2023-06-01', '2023-09-01')
|
|
59
|
+
.median()
|
|
60
|
+
.normalizedDifference(['SR_B5', 'SR_B4']))
|
|
61
|
+
region = ee.Geometry.Rectangle([-122.6, 37.2, -121.8, 38.0])
|
|
62
|
+
|
|
63
|
+
result = datensee.export(
|
|
64
|
+
image, region,
|
|
65
|
+
project="my-gcp-project",
|
|
66
|
+
output="gs://my-bucket/exports/ndvi",
|
|
67
|
+
scale=10, crs="EPSG:32610",
|
|
68
|
+
runner="dataflow", temp_location="gs://my-bucket/tmp",
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`region` also accepts a GeoJSON dict or a shapely geometry. From the shell:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
datensee export expr.json region.geojson \
|
|
76
|
+
--project my-gcp-project \
|
|
77
|
+
--output gs://my-bucket/exports/ndvi \
|
|
78
|
+
--scale 10 --crs EPSG:32610 \
|
|
79
|
+
--runner dataflow --temp-location gs://my-bucket/tmp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Try it end to end with the built-in demo (local runner, ~4 tiles):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
datensee demo --project my-gcp-project --output ./ndvi-output
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## How it works
|
|
89
|
+
|
|
90
|
+
EE is the computation engine; DatensEE is the parallelism engine. It never
|
|
91
|
+
interprets or recompiles your expression — it decomposes the region into a
|
|
92
|
+
globally aligned tile grid, calls the
|
|
93
|
+
[High Volume API](https://developers.google.com/earth-engine/reference/rest/v1/projects.image/computePixels)
|
|
94
|
+
once per tile from a Dataflow pipeline (429-driven backoff, retries, a
|
|
95
|
+
structured failures journal with `datensee retry --until-done`), and
|
|
96
|
+
transcodes each result into self-describing COGs. Every tile is an integer
|
|
97
|
+
pixel rectangle in one canonical grid, and every worker sees the same
|
|
98
|
+
snapshot of every EE asset, so outputs are pixel-exact and reproducible.
|
|
99
|
+
|
|
100
|
+
| | Local (`runner="local"`) | Dataflow (`runner="dataflow"`) |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| **Good for** | Small regions, testing | Large regions, production |
|
|
103
|
+
| **Tile count** | Up to ~100 | Thousands to millions |
|
|
104
|
+
| **Startup** | Seconds (JVM) | ~2 min (VM + container boot) |
|
|
105
|
+
| **Cost** | Free (your machine) | Dataflow vCPU/GB-hours |
|
|
106
|
+
|
|
107
|
+
## Prerequisites
|
|
108
|
+
|
|
109
|
+
- Python 3.12+
|
|
110
|
+
- A GCP project with the Earth Engine API enabled
|
|
111
|
+
- `gcloud auth application-default login` (Colab handles auth automatically via
|
|
112
|
+
`datensee.notebook.ensure_auth()`)
|
|
113
|
+
|
|
114
|
+
## Links
|
|
115
|
+
|
|
116
|
+
- Source, issues, and full documentation:
|
|
117
|
+
<https://github.com/michaelfdewitt/datensee>
|
|
118
|
+
- Colab quickstart:
|
|
119
|
+
<https://github.com/michaelfdewitt/datensee/blob/master/notebooks/datensee_quickstart.ipynb>
|
|
120
|
+
|
|
121
|
+
Apache License 2.0.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# DatensEE
|
|
2
|
+
|
|
3
|
+
**Massively parallel Earth Engine exports via Cloud Dataflow.**
|
|
4
|
+
|
|
5
|
+
DatensEE takes the computation you already wrote in Earth Engine and runs it at
|
|
6
|
+
continental scale. You bring the expression, the region, and the scale — DatensEE
|
|
7
|
+
handles tiling, parallel fetching across thousands of Dataflow workers, and
|
|
8
|
+
assembly into Cloud Optimized GeoTIFFs on GCS.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install datensee
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
No `earthengine-api` dependency, no Java toolchain. Cloud exports launch a
|
|
15
|
+
prebuilt Dataflow Flex Template; the local runner (small regions, debugging)
|
|
16
|
+
fetches a prebuilt pipeline JAR on first use.
|
|
17
|
+
|
|
18
|
+
## Drop-in replacement for `Export.image.toCloudStorage`
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import ee, datensee
|
|
22
|
+
ee.Initialize()
|
|
23
|
+
|
|
24
|
+
image = (ee.ImageCollection('LANDSAT/LC09/C02/T1_L2')
|
|
25
|
+
.filterDate('2023-06-01', '2023-09-01')
|
|
26
|
+
.median()
|
|
27
|
+
.normalizedDifference(['SR_B5', 'SR_B4']))
|
|
28
|
+
region = ee.Geometry.Rectangle([-122.6, 37.2, -121.8, 38.0])
|
|
29
|
+
|
|
30
|
+
result = datensee.export(
|
|
31
|
+
image, region,
|
|
32
|
+
project="my-gcp-project",
|
|
33
|
+
output="gs://my-bucket/exports/ndvi",
|
|
34
|
+
scale=10, crs="EPSG:32610",
|
|
35
|
+
runner="dataflow", temp_location="gs://my-bucket/tmp",
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`region` also accepts a GeoJSON dict or a shapely geometry. From the shell:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
datensee export expr.json region.geojson \
|
|
43
|
+
--project my-gcp-project \
|
|
44
|
+
--output gs://my-bucket/exports/ndvi \
|
|
45
|
+
--scale 10 --crs EPSG:32610 \
|
|
46
|
+
--runner dataflow --temp-location gs://my-bucket/tmp
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Try it end to end with the built-in demo (local runner, ~4 tiles):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
datensee demo --project my-gcp-project --output ./ndvi-output
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## How it works
|
|
56
|
+
|
|
57
|
+
EE is the computation engine; DatensEE is the parallelism engine. It never
|
|
58
|
+
interprets or recompiles your expression — it decomposes the region into a
|
|
59
|
+
globally aligned tile grid, calls the
|
|
60
|
+
[High Volume API](https://developers.google.com/earth-engine/reference/rest/v1/projects.image/computePixels)
|
|
61
|
+
once per tile from a Dataflow pipeline (429-driven backoff, retries, a
|
|
62
|
+
structured failures journal with `datensee retry --until-done`), and
|
|
63
|
+
transcodes each result into self-describing COGs. Every tile is an integer
|
|
64
|
+
pixel rectangle in one canonical grid, and every worker sees the same
|
|
65
|
+
snapshot of every EE asset, so outputs are pixel-exact and reproducible.
|
|
66
|
+
|
|
67
|
+
| | Local (`runner="local"`) | Dataflow (`runner="dataflow"`) |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| **Good for** | Small regions, testing | Large regions, production |
|
|
70
|
+
| **Tile count** | Up to ~100 | Thousands to millions |
|
|
71
|
+
| **Startup** | Seconds (JVM) | ~2 min (VM + container boot) |
|
|
72
|
+
| **Cost** | Free (your machine) | Dataflow vCPU/GB-hours |
|
|
73
|
+
|
|
74
|
+
## Prerequisites
|
|
75
|
+
|
|
76
|
+
- Python 3.12+
|
|
77
|
+
- A GCP project with the Earth Engine API enabled
|
|
78
|
+
- `gcloud auth application-default login` (Colab handles auth automatically via
|
|
79
|
+
`datensee.notebook.ensure_auth()`)
|
|
80
|
+
|
|
81
|
+
## Links
|
|
82
|
+
|
|
83
|
+
- Source, issues, and full documentation:
|
|
84
|
+
<https://github.com/michaelfdewitt/datensee>
|
|
85
|
+
- Colab quickstart:
|
|
86
|
+
<https://github.com/michaelfdewitt/datensee/blob/master/notebooks/datensee_quickstart.ipynb>
|
|
87
|
+
|
|
88
|
+
Apache License 2.0.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "datensee"
|
|
3
|
+
version = "0.1.0a1"
|
|
4
|
+
description = "DatensEE: Parallelize Google Earth Engine exports via Cloud Dataflow"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
keywords = [
|
|
9
|
+
"earth-engine",
|
|
10
|
+
"gee",
|
|
11
|
+
"dataflow",
|
|
12
|
+
"geotiff",
|
|
13
|
+
"cog",
|
|
14
|
+
"remote-sensing",
|
|
15
|
+
]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: Scientific/Engineering :: GIS",
|
|
25
|
+
"Typing :: Typed",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"typer>=0.12",
|
|
29
|
+
"pydantic>=2.0",
|
|
30
|
+
"httpx>=0.27",
|
|
31
|
+
"rich>=13.0",
|
|
32
|
+
"pyproj>=3.6",
|
|
33
|
+
"shapely>=2.0",
|
|
34
|
+
"google-auth>=2.0",
|
|
35
|
+
"google-cloud-storage>=2.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[[project.authors]]
|
|
39
|
+
name = "DatensEE Contributors"
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/michaelfdewitt/datensee"
|
|
43
|
+
Repository = "https://github.com/michaelfdewitt/datensee"
|
|
44
|
+
Issues = "https://github.com/michaelfdewitt/datensee/issues"
|
|
45
|
+
Changelog = "https://github.com/michaelfdewitt/datensee/releases"
|
|
46
|
+
|
|
47
|
+
[project.scripts]
|
|
48
|
+
datensee = "datensee.main:app"
|
|
49
|
+
|
|
50
|
+
[project.optional-dependencies]
|
|
51
|
+
validation = ["rasterio>=1.3"]
|
|
52
|
+
|
|
53
|
+
[build-system]
|
|
54
|
+
requires = ["uv_build>=0.10.10,<0.11.0"]
|
|
55
|
+
build-backend = "uv_build"
|
|
56
|
+
|
|
57
|
+
[tool.uv]
|
|
58
|
+
package = true
|
|
59
|
+
|
|
60
|
+
[tool.ruff]
|
|
61
|
+
line-length = 100
|
|
62
|
+
target-version = "py312"
|
|
63
|
+
|
|
64
|
+
[tool.ruff.lint]
|
|
65
|
+
select = [
|
|
66
|
+
"E",
|
|
67
|
+
"F",
|
|
68
|
+
"I",
|
|
69
|
+
"UP",
|
|
70
|
+
"B",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[tool.pytest.ini_options]
|
|
74
|
+
testpaths = ["tests"]
|
|
75
|
+
|
|
76
|
+
[dependency-groups]
|
|
77
|
+
dev = [
|
|
78
|
+
"earthengine-api>=1.7.24",
|
|
79
|
+
"jsonschema>=4.0",
|
|
80
|
+
"numpy>=2.4.3",
|
|
81
|
+
"pytest>=8.0",
|
|
82
|
+
"pytest-httpx>=0.30",
|
|
83
|
+
"ruff>=0.4",
|
|
84
|
+
]
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "datensee"
|
|
3
|
+
version = "0.1.0a1"
|
|
4
|
+
description = "DatensEE: Parallelize Google Earth Engine exports via Cloud Dataflow"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
authors = [{ name = "DatensEE Contributors" }]
|
|
9
|
+
keywords = ["earth-engine", "gee", "dataflow", "geotiff", "cog", "remote-sensing"]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 3 - Alpha",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Intended Audience :: Science/Research",
|
|
14
|
+
"License :: OSI Approved :: Apache Software License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Topic :: Scientific/Engineering :: GIS",
|
|
19
|
+
"Typing :: Typed",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"typer>=0.12",
|
|
23
|
+
"pydantic>=2.0",
|
|
24
|
+
"httpx>=0.27",
|
|
25
|
+
"rich>=13.0",
|
|
26
|
+
"pyproj>=3.6",
|
|
27
|
+
"shapely>=2.0",
|
|
28
|
+
"google-auth>=2.0",
|
|
29
|
+
"google-cloud-storage>=2.0",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/michaelfdewitt/datensee"
|
|
34
|
+
Repository = "https://github.com/michaelfdewitt/datensee"
|
|
35
|
+
Issues = "https://github.com/michaelfdewitt/datensee/issues"
|
|
36
|
+
Changelog = "https://github.com/michaelfdewitt/datensee/releases"
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
datensee = "datensee.main:app"
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
validation = ["rasterio>=1.3"]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["uv_build>=0.10.10,<0.11.0"]
|
|
46
|
+
build-backend = "uv_build"
|
|
47
|
+
|
|
48
|
+
[tool.uv]
|
|
49
|
+
package = true
|
|
50
|
+
|
|
51
|
+
[dependency-groups]
|
|
52
|
+
dev = [
|
|
53
|
+
"earthengine-api>=1.7.24",
|
|
54
|
+
"jsonschema>=4.0",
|
|
55
|
+
"numpy>=2.4.3",
|
|
56
|
+
"pytest>=8.0",
|
|
57
|
+
"pytest-httpx>=0.30",
|
|
58
|
+
"ruff>=0.4",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
line-length = 100
|
|
63
|
+
target-version = "py312"
|
|
64
|
+
|
|
65
|
+
[tool.ruff.lint]
|
|
66
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
67
|
+
|
|
68
|
+
[tool.pytest.ini_options]
|
|
69
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""DatensEE: Parallelize Google Earth Engine exports via Cloud Dataflow."""
|
|
2
|
+
|
|
3
|
+
from datensee._version import __version__ # noqa: F401
|
|
4
|
+
|
|
5
|
+
# Public API — usable from notebooks and scripts without touching the CLI.
|
|
6
|
+
from datensee.api import ExportResult, demo, export, poll, tile # noqa: F401
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Single source of truth for the package version at runtime.
|
|
2
|
+
|
|
3
|
+
The version is declared once, in ``cli/pyproject.toml``; everything else
|
|
4
|
+
derives from it: ``datensee.__version__``, the default Flex Template
|
|
5
|
+
spec URI (``datensee.template``), the GitHub Release the pipeline JAR is
|
|
6
|
+
downloaded from (``datensee.jar``), and the Gradle ``version`` (read
|
|
7
|
+
from the same TOML by ``pipelines/build.gradle.kts``).
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
__version__ = version("datensee")
|
|
16
|
+
except PackageNotFoundError: # source tree on sys.path without an install
|
|
17
|
+
__version__ = "0.0.0+unknown"
|