earthdaily 0.0.1__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.
Files changed (27) hide show
  1. earthdaily-0.0.1/LICENSE +21 -0
  2. earthdaily-0.0.1/PKG-INFO +43 -0
  3. earthdaily-0.0.1/README.md +29 -0
  4. earthdaily-0.0.1/earthdaily/__init__.py +3 -0
  5. earthdaily-0.0.1/earthdaily/datasets/__init__.py +61 -0
  6. earthdaily-0.0.1/earthdaily/datasets/data/__init__.py +0 -0
  7. earthdaily-0.0.1/earthdaily/datasets/data/pivot.geojson +1 -0
  8. earthdaily-0.0.1/earthdaily/datasets/data/pivot_corumba.geojson +276 -0
  9. earthdaily-0.0.1/earthdaily/earthdatastore/__init__.py +819 -0
  10. earthdaily-0.0.1/earthdaily/earthdatastore/_scales_collections.py +54 -0
  11. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/__init__.py +413 -0
  12. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/_zonal.py +166 -0
  13. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/asset_mapper/__init__.py +55 -0
  14. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/asset_mapper/__update_asset_mapper_config_json.py +32 -0
  15. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/custom_operations.py +38 -0
  16. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/geometry_manager.py +60 -0
  17. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/harmonizer/__init__.py +153 -0
  18. earthdaily-0.0.1/earthdaily/earthdatastore/cube_utils/preprocessing.py +16 -0
  19. earthdaily-0.0.1/earthdaily/earthdatastore/mask/__init__.py +241 -0
  20. earthdaily-0.0.1/earthdaily.egg-info/PKG-INFO +43 -0
  21. earthdaily-0.0.1/earthdaily.egg-info/SOURCES.txt +25 -0
  22. earthdaily-0.0.1/earthdaily.egg-info/dependency_links.txt +1 -0
  23. earthdaily-0.0.1/earthdaily.egg-info/not-zip-safe +1 -0
  24. earthdaily-0.0.1/earthdaily.egg-info/requires.txt +22 -0
  25. earthdaily-0.0.1/earthdaily.egg-info/top_level.txt +1 -0
  26. earthdaily-0.0.1/setup.cfg +4 -0
  27. earthdaily-0.0.1/setup.py +48 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Geosys
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.1
2
+ Name: earthdaily
3
+ Version: 0.0.1
4
+ Summary: earthdaily: easy authentication, search and retrieval of Earth Data Store collections data
5
+ Home-page: UNKNOWN
6
+ Author: EarthDaily Agro
7
+ License: MIT
8
+ Keywords: Earth Data Store,earthdaily,earthdailyagro,stac
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+
14
+ # Earthdaily Python Package
15
+ [![PyPI version](https://badge.fury.io/py/earthdaily.png)](https://badge.fury.io/py/earthdaily)
16
+ [![Documentation](https://img.shields.io/badge/Documentation-html-green.svg)](https://geosys.github.io/earthdaily-python-client/)
17
+ [![pytest-main](https://github.com/GEOSYS/earthdaily-python-client/actions/workflows/pytest-prod.yaml/badge.svg)](https://github.com/GEOSYS/earthdaily-python-client/actions/workflows/pytest-prod.yaml)
18
+
19
+ ## Your Gateway to the Stac Catalog Earth Data Store
20
+
21
+ In the realm of geospatial data analysis and Earth observation, the EarthDaily Python package emerges as a powerful toolset that seamlessly connects you to the vast and invaluable Stac catalog Earth Data Store. This package is designed with the vision of simplifying and optimizing your workflow, ensuring that you can harness the full potential of Earth observation data with ease and efficiency.
22
+
23
+ Our package is built upon a foundation of best practices, meticulously crafted to elevate your data analysis experience. With EarthDaily, you can effortlessly navigate the complexities of datacube creation, including crucial processes like conversion to reflectance and automatic clipping to your area of interest. Additionally, we've taken care to make EarthDaily fully compatible with Dask, enabling you to scale your data preprocessing tasks with confidence and precision.
24
+
25
+ ## Install
26
+
27
+ ### Using pip
28
+
29
+ `pip install earthdaily`
30
+
31
+ ### Planned : Using conda/mamba
32
+
33
+ ## Authentication
34
+ Authentication credentials are accessed from environment variables. As a convenience python-dotenv is supported.
35
+ Copy the `.env.sample` file and rename to simply `.env` and update with your credentials. This file is gitignored.
36
+ Then add to your script/notebook:
37
+
38
+ ```python3
39
+ from dotenv import load_dotenv
40
+
41
+ load_dotenv() # take environment variables from .env.
42
+ ```
43
+
@@ -0,0 +1,29 @@
1
+ # Earthdaily Python Package
2
+ [![PyPI version](https://badge.fury.io/py/earthdaily.png)](https://badge.fury.io/py/earthdaily)
3
+ [![Documentation](https://img.shields.io/badge/Documentation-html-green.svg)](https://geosys.github.io/earthdaily-python-client/)
4
+ [![pytest-main](https://github.com/GEOSYS/earthdaily-python-client/actions/workflows/pytest-prod.yaml/badge.svg)](https://github.com/GEOSYS/earthdaily-python-client/actions/workflows/pytest-prod.yaml)
5
+
6
+ ## Your Gateway to the Stac Catalog Earth Data Store
7
+
8
+ In the realm of geospatial data analysis and Earth observation, the EarthDaily Python package emerges as a powerful toolset that seamlessly connects you to the vast and invaluable Stac catalog Earth Data Store. This package is designed with the vision of simplifying and optimizing your workflow, ensuring that you can harness the full potential of Earth observation data with ease and efficiency.
9
+
10
+ Our package is built upon a foundation of best practices, meticulously crafted to elevate your data analysis experience. With EarthDaily, you can effortlessly navigate the complexities of datacube creation, including crucial processes like conversion to reflectance and automatic clipping to your area of interest. Additionally, we've taken care to make EarthDaily fully compatible with Dask, enabling you to scale your data preprocessing tasks with confidence and precision.
11
+
12
+ ## Install
13
+
14
+ ### Using pip
15
+
16
+ `pip install earthdaily`
17
+
18
+ ### Planned : Using conda/mamba
19
+
20
+ ## Authentication
21
+ Authentication credentials are accessed from environment variables. As a convenience python-dotenv is supported.
22
+ Copy the `.env.sample` file and rename to simply `.env` and update with your credentials. This file is gitignored.
23
+ Then add to your script/notebook:
24
+
25
+ ```python3
26
+ from dotenv import load_dotenv
27
+
28
+ load_dotenv() # take environment variables from .env.
29
+ ```
@@ -0,0 +1,3 @@
1
+ from . import earthdatastore, datasets
2
+
3
+ __version__ = "0.0.1"
@@ -0,0 +1,61 @@
1
+ import os
2
+ import geopandas as gpd
3
+
4
+ __pathFile = os.path.dirname(os.path.realpath(__file__))
5
+
6
+
7
+ def _load_json(path, to_wkt: bool = False, to_geojson: bool = False):
8
+ pivot = gpd.read_file(path)
9
+ if to_wkt:
10
+ pivot = pivot.to_wkt()["geometry"].iloc[0]
11
+ if to_geojson:
12
+ pivot = pivot.to_json()
13
+ return pivot
14
+
15
+
16
+ def load_pivot(to_wkt: bool = False, to_geojson: bool = False):
17
+ """
18
+ A pivot located in Nebraska.
19
+
20
+ Parameters
21
+ ----------
22
+ to_wkt : BOOL, optional
23
+ Returns the pivot as a wkt. The default is False.
24
+ to_geojson : BOOL, optional
25
+ Returns the pivot as a geojson. The default is False.
26
+
27
+ Returns
28
+ -------
29
+ pivot : str, GeoDataFrame
30
+ DESCRIPTION.
31
+
32
+ """
33
+ return _load_json(
34
+ os.path.join(__pathFile, f"data{os.path.sep}pivot.geojson"),
35
+ to_wkt=to_wkt,
36
+ to_geojson=to_geojson,
37
+ )
38
+
39
+
40
+ def load_pivot_corumba(to_wkt: bool = False, to_geojson: bool = False):
41
+ """
42
+ A pivot located in Corumba (between Goianas and Brasilia, Brazil).
43
+
44
+ Parameters
45
+ ----------
46
+ to_wkt : BOOL, optional
47
+ Returns the pivot as a wkt. The default is False.
48
+ to_geojson : BOOL, optional
49
+ Returns the pivot as a geojson. The default is False.
50
+
51
+ Returns
52
+ -------
53
+ pivot : str, GeoDataFrame
54
+ DESCRIPTION.
55
+
56
+ """
57
+ return _load_json(
58
+ os.path.join(__pathFile, f"data{os.path.sep}pivot_corumba.geojson"),
59
+ to_wkt=to_wkt,
60
+ to_geojson=to_geojson,
61
+ )
File without changes
@@ -0,0 +1 @@
1
+ {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.53098192708502,41.34963723356878],[-96.53134195570841,41.34962395546032],[-96.53169851662234,41.34958424902657],[-96.53204817553002,41.34951849671001],[-96.5323875646378,41.349427331819136],[-96.53271341510357,41.34931163242622],[-96.53302258853066,41.34917251290712],[-96.53331210720297,41.34901131320419],[-96.53357918277001,41.34882958591644],[-96.53382124310508,41.34862908134102],[-96.53403595707788,41.34841173061065],[-96.53422125700301,41.34817962708938],[-96.53437535854795,41.34793500620635],[-96.53449677790918,41.347680223921806],[-96.53458434609134,41.34741773403294],[-96.53463722015225,41.34715006453858],[-96.53465489130599,41.346879793290086],[-96.53463718980665,41.34660952316347],[-96.53458428656631,41.34634185699161],[-96.53449669149224,41.346079372498224],[-96.53437524856004,41.345824597474746],[-96.5342211276709,41.34557998543936],[-96.53403581337176,41.34534789201229],[-96.53382109054748,41.345130552234764],[-96.53357902722364,41.344930059049936],[-96.53331195464537,41.344748343152766],[-96.53302244482454,41.34458715440269],[-96.53271328577146,41.34444804497778],[-96.53238745464988,41.3443323544325],[-96.53204808911309,41.3442411968027],[-96.5316984570973,41.344175449881604],[-96.53134192536282,41.34413574677036],[-96.53098192708502,41.344122469783784],[-96.53062192880722,41.34413574677036],[-96.53026539707271,41.344175449881604],[-96.52991576505694,41.3442411968027],[-96.52957639952012,41.3443323544325],[-96.52925056839857,41.34444804497778],[-96.52894140934549,41.34458715440269],[-96.52865189952465,41.344748343152766],[-96.5283848269464,41.344930059049936],[-96.52814276362257,41.345130552234764],[-96.52792804079827,41.34534789201229],[-96.52774272649911,41.34557998543936],[-96.52758860560998,41.345824597474746],[-96.5274671626778,41.346079372498224],[-96.5273795676037,41.34634185699161],[-96.52732666436337,41.34660952316347],[-96.52730896286403,41.346879793290086],[-96.52732663401778,41.34715006453858],[-96.52737950807868,41.34741773403294],[-96.52746707626085,41.347680223921806],[-96.52758849562207,41.34793500620635],[-96.527742597167,41.34817962708938],[-96.52792789709216,41.34841173061065],[-96.52814261106494,41.34862908134102],[-96.5283846714,41.34882958591644],[-96.52865174696704,41.34901131320419],[-96.52894126563936,41.34917251290712],[-96.52925043906646,41.34931163242622],[-96.52957628953222,41.349427331819136],[-96.52991567864001,41.34951849671001],[-96.53026533754769,41.34958424902657],[-96.53062189846162,41.34962395546032],[-96.53098192708502,41.34963723356878]]]},"id":0}]}
@@ -0,0 +1,276 @@
1
+ {
2
+ "type": "FeatureCollection",
3
+ "features": [
4
+ {
5
+ "type": "Feature",
6
+ "properties": {},
7
+ "geometry": {
8
+ "type": "Polygon",
9
+ "coordinates": [
10
+ [
11
+ [
12
+ -48.51399962617063,
13
+ -16.341886209315362
14
+ ],
15
+ [
16
+ -48.514266176701774,
17
+ -16.341898774903683
18
+ ],
19
+ [
20
+ -48.514530160307615,
21
+ -16.341936350659985
22
+ ],
23
+ [
24
+ -48.51478903477982,
25
+ -16.341998574723473
26
+ ],
27
+ [
28
+ -48.51504030710614,
29
+ -16.342084847865586
30
+ ],
31
+ [
32
+ -48.51528155747596,
33
+ -16.34219433926
34
+ ],
35
+ [
36
+ -48.51551046258136,
37
+ -16.342325994482763
38
+ ],
39
+ [
40
+ -48.515724817989394,
41
+ -16.34247854566549
42
+ ],
43
+ [
44
+ -48.51592255937009,
45
+ -16.342650523703963
46
+ ],
47
+ [
48
+ -48.51610178237588,
49
+ -16.342840272404615
50
+ ],
51
+ [
52
+ -48.516260760981226,
53
+ -16.343045964432683
54
+ ],
55
+ [
56
+ -48.51639796410551,
57
+ -16.34326561890857
58
+ ],
59
+ [
60
+ -48.51651207035929,
61
+ -16.343497120482986
62
+ ],
63
+ [
64
+ -48.516601980771966,
65
+ -16.343738239707243
66
+ ],
67
+ [
68
+ -48.51666682937784,
69
+ -16.343986654502615
70
+ ],
71
+ [
72
+ -48.516705991559,
73
+ -16.34423997252202
74
+ ],
75
+ [
76
+ -48.5167190900641,
77
+ -16.344495754188742
78
+ ],
79
+ [
80
+ -48.51670599864535,
81
+ -16.344751536190333
82
+ ],
83
+ [
84
+ -48.516666843278216,
85
+ -16.34500485520148
86
+ ],
87
+ [
88
+ -48.51660200095217,
89
+ -16.34525327160735
90
+ ],
91
+ [
92
+ -48.51651209604381,
93
+ -16.34549439299897
94
+ ],
95
+ [
96
+ -48.51639799430731,
97
+ -16.34572589721432
98
+ ],
99
+ [
100
+ -48.51626079453968,
101
+ -16.345945554703235
102
+ ],
103
+ [
104
+ -48.51610181800134,
105
+ -16.346151250000624
106
+ ],
107
+ [
108
+ -48.515922595693496,
109
+ -16.34634100210126
110
+ ],
111
+ [
112
+ -48.51572485361487,
113
+ -16.346512983539718
114
+ ],
115
+ [
116
+ -48.51551049613981,
117
+ -16.34666553799176
118
+ ],
119
+ [
120
+ -48.51528158767776,
121
+ -16.346797196227552
122
+ ],
123
+ [
124
+ -48.51504033279067,
125
+ -16.346906690262905
126
+ ],
127
+ [
128
+ -48.514789054960026,
129
+ -16.346992965572383
130
+ ],
131
+ [
132
+ -48.51453017420798,
133
+ -16.347055191246366
134
+ ],
135
+ [
136
+ -48.51426618378812,
137
+ -16.347092767994408
138
+ ],
139
+ [
140
+ -48.51399962617063,
141
+ -16.347105333917597
142
+ ],
143
+ [
144
+ -48.513733068553144,
145
+ -16.347092767994408
146
+ ],
147
+ [
148
+ -48.513469078133284,
149
+ -16.347055191246366
150
+ ],
151
+ [
152
+ -48.51321019738124,
153
+ -16.346992965572383
154
+ ],
155
+ [
156
+ -48.5129589195506,
157
+ -16.346906690262905
158
+ ],
159
+ [
160
+ -48.512717664663505,
161
+ -16.346797196227552
162
+ ],
163
+ [
164
+ -48.51248875620145,
165
+ -16.34666553799176
166
+ ],
167
+ [
168
+ -48.5122743987264,
169
+ -16.346512983539718
170
+ ],
171
+ [
172
+ -48.51207665664777,
173
+ -16.34634100210126
174
+ ],
175
+ [
176
+ -48.51189743433992,
177
+ -16.346151250000624
178
+ ],
179
+ [
180
+ -48.511738457801584,
181
+ -16.345945554703235
182
+ ],
183
+ [
184
+ -48.51160125803395,
185
+ -16.34572589721432
186
+ ],
187
+ [
188
+ -48.51148715629744,
189
+ -16.34549439299897
190
+ ],
191
+ [
192
+ -48.51139725138909,
193
+ -16.34525327160735
194
+ ],
195
+ [
196
+ -48.51133240906305,
197
+ -16.34500485520148
198
+ ],
199
+ [
200
+ -48.51129325369591,
201
+ -16.344751536190333
202
+ ],
203
+ [
204
+ -48.51128016227716,
205
+ -16.344495754188742
206
+ ],
207
+ [
208
+ -48.51129326078225,
209
+ -16.34423997252202
210
+ ],
211
+ [
212
+ -48.51133242296341,
213
+ -16.343986654502615
214
+ ],
215
+ [
216
+ -48.511397271569294,
217
+ -16.343738239707243
218
+ ],
219
+ [
220
+ -48.51148718198197,
221
+ -16.343497120482986
222
+ ],
223
+ [
224
+ -48.51160128823575,
225
+ -16.34326561890857
226
+ ],
227
+ [
228
+ -48.511738491360035,
229
+ -16.343045964432683
230
+ ],
231
+ [
232
+ -48.511897469965376,
233
+ -16.342840272404615
234
+ ],
235
+ [
236
+ -48.51207669297118,
237
+ -16.342650523703963
238
+ ],
239
+ [
240
+ -48.51227443435186,
241
+ -16.34247854566549
242
+ ],
243
+ [
244
+ -48.51248878975991,
245
+ -16.342325994482763
246
+ ],
247
+ [
248
+ -48.51271769486531,
249
+ -16.34219433926
250
+ ],
251
+ [
252
+ -48.51295894523512,
253
+ -16.342084847865586
254
+ ],
255
+ [
256
+ -48.51321021756144,
257
+ -16.341998574723473
258
+ ],
259
+ [
260
+ -48.51346909203365,
261
+ -16.341936350659985
262
+ ],
263
+ [
264
+ -48.51373307563949,
265
+ -16.341898774903683
266
+ ],
267
+ [
268
+ -48.51399962617063,
269
+ -16.341886209315362
270
+ ]
271
+ ]
272
+ ]
273
+ }
274
+ }
275
+ ]
276
+ }