RadGEEToolbox 1.6.7__py3-none-any.whl → 1.6.8__py3-none-any.whl
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.
- RadGEEToolbox/LandsatCollection.py +1043 -207
- RadGEEToolbox/Sentinel1Collection.py +543 -210
- RadGEEToolbox/Sentinel2Collection.py +937 -216
- RadGEEToolbox/VisParams.py +173 -85
- RadGEEToolbox/__init__.py +1 -1
- {radgeetoolbox-1.6.7.dist-info → radgeetoolbox-1.6.8.dist-info}/METADATA +32 -9
- radgeetoolbox-1.6.8.dist-info/RECORD +12 -0
- radgeetoolbox-1.6.7.dist-info/RECORD +0 -12
- {radgeetoolbox-1.6.7.dist-info → radgeetoolbox-1.6.8.dist-info}/WHEEL +0 -0
- {radgeetoolbox-1.6.7.dist-info → radgeetoolbox-1.6.8.dist-info}/licenses/LICENSE.txt +0 -0
- {radgeetoolbox-1.6.7.dist-info → radgeetoolbox-1.6.8.dist-info}/top_level.txt +0 -0
RadGEEToolbox/VisParams.py
CHANGED
|
@@ -3,7 +3,7 @@ from .GetPalette import get_palette
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
def get_visualization_params(
|
|
6
|
-
satellite, index, min_val=None, max_val=None, palette=None
|
|
6
|
+
satellite, index, min_val=None, max_val=None, palette=None, scaled_bands=False
|
|
7
7
|
):
|
|
8
8
|
"""
|
|
9
9
|
Function to define visualization paramaters for image visualization. Outputs an vis_params dictionary.
|
|
@@ -20,91 +20,179 @@ def get_visualization_params(
|
|
|
20
20
|
"""
|
|
21
21
|
# Define visualization parameters for various image types
|
|
22
22
|
if satellite == "Landsat" or satellite == "landsat":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
if scaled_bands == False:
|
|
24
|
+
params_dict = {
|
|
25
|
+
"TrueColor": {"min": 0, "max": 30000, "bands": ["SR_B4", "SR_B3", "SR_B2"]},
|
|
26
|
+
"NDVI": {
|
|
27
|
+
"min": 0,
|
|
28
|
+
"max": 0.5,
|
|
29
|
+
"bands": ["ndvi"],
|
|
30
|
+
"palette": get_palette("greens"),
|
|
31
|
+
},
|
|
32
|
+
"NDWI": {
|
|
33
|
+
"min": -0.2,
|
|
34
|
+
"max": 0.2,
|
|
35
|
+
"bands": ["ndwi"],
|
|
36
|
+
"palette": get_palette("inferno"),
|
|
37
|
+
},
|
|
38
|
+
"halite": {
|
|
39
|
+
"min": 0.1,
|
|
40
|
+
"max": 0.5,
|
|
41
|
+
"bands": ["halite"],
|
|
42
|
+
"palette": get_palette("haline"),
|
|
43
|
+
},
|
|
44
|
+
"gypsum": {
|
|
45
|
+
"min": 0.0,
|
|
46
|
+
"max": 0.5,
|
|
47
|
+
"bands": ["gypsum"],
|
|
48
|
+
"palette": get_palette("ylord"),
|
|
49
|
+
},
|
|
50
|
+
"LST": {
|
|
51
|
+
"min": 0,
|
|
52
|
+
"max": 40,
|
|
53
|
+
"bands": ["LST"],
|
|
54
|
+
"palette": get_palette("thermal"),
|
|
55
|
+
},
|
|
56
|
+
"NDTI": {
|
|
57
|
+
"min": -0.2,
|
|
58
|
+
"max": 0.2,
|
|
59
|
+
"bands": ["ndti"],
|
|
60
|
+
"palette": get_palette("turbid"),
|
|
61
|
+
},
|
|
62
|
+
"KIVU": {
|
|
63
|
+
"min": -0.5,
|
|
64
|
+
"max": 0.2,
|
|
65
|
+
"bands": ["kivu"],
|
|
66
|
+
"palette": get_palette("algae"),
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
else:
|
|
70
|
+
params_dict = {
|
|
71
|
+
"TrueColor": {"min": 0, "max": 1, "bands": ["SR_B4", "SR_B3", "SR_B2"]},
|
|
72
|
+
"NDVI": {
|
|
73
|
+
"min": 0,
|
|
74
|
+
"max": 0.5,
|
|
75
|
+
"bands": ["ndvi"],
|
|
76
|
+
"palette": get_palette("greens"),
|
|
77
|
+
},
|
|
78
|
+
"NDWI": {
|
|
79
|
+
"min": -0.2,
|
|
80
|
+
"max": 0.2,
|
|
81
|
+
"bands": ["ndwi"],
|
|
82
|
+
"palette": get_palette("inferno"),
|
|
83
|
+
},
|
|
84
|
+
"halite": {
|
|
85
|
+
"min": 0.1,
|
|
86
|
+
"max": 0.5,
|
|
87
|
+
"bands": ["halite"],
|
|
88
|
+
"palette": get_palette("haline"),
|
|
89
|
+
},
|
|
90
|
+
"gypsum": {
|
|
91
|
+
"min": 0.0,
|
|
92
|
+
"max": 0.5,
|
|
93
|
+
"bands": ["gypsum"],
|
|
94
|
+
"palette": get_palette("ylord"),
|
|
95
|
+
},
|
|
96
|
+
"LST": {
|
|
97
|
+
"min": 0,
|
|
98
|
+
"max": 40,
|
|
99
|
+
"bands": ["LST"],
|
|
100
|
+
"palette": get_palette("thermal"),
|
|
101
|
+
},
|
|
102
|
+
"NDTI": {
|
|
103
|
+
"min": -0.2,
|
|
104
|
+
"max": 0.2,
|
|
105
|
+
"bands": ["ndti"],
|
|
106
|
+
"palette": get_palette("turbid"),
|
|
107
|
+
},
|
|
108
|
+
"KIVU": {
|
|
109
|
+
"min": -0.5,
|
|
110
|
+
"max": 0.2,
|
|
111
|
+
"bands": ["kivu"],
|
|
112
|
+
"palette": get_palette("algae"),
|
|
113
|
+
},
|
|
114
|
+
}
|
|
68
115
|
elif satellite == "Sentinel2" or satellite == "sentinel2":
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
if scaled_bands == False:
|
|
117
|
+
params_dict = {
|
|
118
|
+
"TrueColor": {"min": 0, "max": 3500, "bands": ["B4", "B3", "B2"]},
|
|
119
|
+
"NDVI": {
|
|
120
|
+
"min": 0.5,
|
|
121
|
+
"max": 0.9,
|
|
122
|
+
"bands": ["ndvi"],
|
|
123
|
+
"palette": get_palette("greens"),
|
|
124
|
+
},
|
|
125
|
+
"NDWI": {
|
|
126
|
+
"min": -0.2,
|
|
127
|
+
"max": 0.2,
|
|
128
|
+
"bands": ["ndwi"],
|
|
129
|
+
"palette": get_palette("inferno"),
|
|
130
|
+
},
|
|
131
|
+
"halite": {
|
|
132
|
+
"min": 0.1,
|
|
133
|
+
"max": 0.7,
|
|
134
|
+
"bands": ["halite"],
|
|
135
|
+
"palette": get_palette("haline"),
|
|
136
|
+
},
|
|
137
|
+
"gypsum": {
|
|
138
|
+
"min": 0.0,
|
|
139
|
+
"max": 0.7,
|
|
140
|
+
"bands": ["gypsum"],
|
|
141
|
+
"palette": get_palette("ylord"),
|
|
142
|
+
},
|
|
143
|
+
"NDTI": {
|
|
144
|
+
"min": -0.2,
|
|
145
|
+
"max": 0.5,
|
|
146
|
+
"bands": ["ndti"],
|
|
147
|
+
"palette": get_palette("turbid"),
|
|
148
|
+
},
|
|
149
|
+
"2BDA": {
|
|
150
|
+
"min": 0.5,
|
|
151
|
+
"max": 1.75,
|
|
152
|
+
"bands": ["2BDA"],
|
|
153
|
+
"palette": get_palette("algae"),
|
|
154
|
+
},
|
|
155
|
+
}
|
|
156
|
+
else:
|
|
157
|
+
params_dict = {
|
|
158
|
+
"TrueColor": {"min": 0, "max": 1, "bands": ["B4", "B3", "B2"]},
|
|
159
|
+
"NDVI": {
|
|
160
|
+
"min": 0.5,
|
|
161
|
+
"max": 0.9,
|
|
162
|
+
"bands": ["ndvi"],
|
|
163
|
+
"palette": get_palette("greens"),
|
|
164
|
+
},
|
|
165
|
+
"NDWI": {
|
|
166
|
+
"min": -0.2,
|
|
167
|
+
"max": 0.2,
|
|
168
|
+
"bands": ["ndwi"],
|
|
169
|
+
"palette": get_palette("inferno"),
|
|
170
|
+
},
|
|
171
|
+
"halite": {
|
|
172
|
+
"min": 0.1,
|
|
173
|
+
"max": 0.7,
|
|
174
|
+
"bands": ["halite"],
|
|
175
|
+
"palette": get_palette("haline"),
|
|
176
|
+
},
|
|
177
|
+
"gypsum": {
|
|
178
|
+
"min": 0.0,
|
|
179
|
+
"max": 0.7,
|
|
180
|
+
"bands": ["gypsum"],
|
|
181
|
+
"palette": get_palette("ylord"),
|
|
182
|
+
},
|
|
183
|
+
"NDTI": {
|
|
184
|
+
"min": -0.2,
|
|
185
|
+
"max": 0.5,
|
|
186
|
+
"bands": ["ndti"],
|
|
187
|
+
"palette": get_palette("turbid"),
|
|
188
|
+
},
|
|
189
|
+
"2BDA": {
|
|
190
|
+
"min": 0.5,
|
|
191
|
+
"max": 1.75,
|
|
192
|
+
"bands": ["2BDA"],
|
|
193
|
+
"palette": get_palette("algae"),
|
|
194
|
+
},
|
|
195
|
+
}
|
|
108
196
|
else:
|
|
109
197
|
raise ValueError(
|
|
110
198
|
"Incorrect definition of satellite. Options: 'Landsat', 'landsat', 'Sentinel2', or 'sentinel2'"
|
RadGEEToolbox/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RadGEEToolbox
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.8
|
|
4
4
|
Summary: Streamlined Multispectral & SAR Analysis for Google Earth Engine Python API
|
|
5
5
|
Home-page: https://github.com/radwinskis/RadGEEToolbox
|
|
6
6
|
Author: Mark Radwin
|
|
@@ -54,6 +54,8 @@ Although similar packages exist (eemont, geetools, etc.), `RadGEEToolbox` extend
|
|
|
54
54
|
| **Transect Time-series Extraction** | **YES** | NO | NO |
|
|
55
55
|
| **Comprehensive Preprocessing Operations** | **YES** | **YES** | **YES** |
|
|
56
56
|
| **Reflectance Scaling (DN to ρ)** | **YES** | **YES** | **YES** |
|
|
57
|
+
| **Narrowband to Broadband Albedo Calculation** | **YES** | NO | NO |
|
|
58
|
+
| **Built-in Spectral Index Calculations** | **YES** | **YES** | **YES** |
|
|
57
59
|
| **Land Surface Temperature Calculation (Landsat)** | **YES** | NO | NO |
|
|
58
60
|
| **Image Selection by Date or Index** | **YES** | **YES** | NO |
|
|
59
61
|
| **Visualization Presets/Tools** | **YES** | NO | NO |
|
|
@@ -127,11 +129,32 @@ _________
|
|
|
127
129
|
|
|
128
130
|
- Modular tools for processing **Landsat, Sentinel-1 SAR, and Sentinel-2** imagery
|
|
129
131
|
- Efficient filtering, masking, and mosaicking of Earth Engine image collections
|
|
130
|
-
- Built-in support for computing **spectral indices** (
|
|
132
|
+
- Built-in support for computing **spectral indices** (see below for complete list)
|
|
131
133
|
- SAR utilities for **multilooking**, **speckle filtering**, and **backscatter conversion**
|
|
132
|
-
- Automated extraction of **transect and zonal statistics** across image collections
|
|
134
|
+
- Automated and flexible extraction of **transect and zonal statistics** across image collections
|
|
133
135
|
- Easy conversion between RadGEEToolbox and standard Earth Engine objects
|
|
134
|
-
- Server-side–friendly workflows and caching for faster, scalable processing
|
|
136
|
+
- Server-side–friendly workflows and caching for **faster, scalable** processing
|
|
137
|
+
|
|
138
|
+
**List of all spectral index calculations available for
|
|
139
|
+
Landsat (TM & OLI) and Sentinel-2 (MSI) imagery:**
|
|
140
|
+
|
|
141
|
+
- Normalized Difference Water Index (NDWI)
|
|
142
|
+
- Modified Normalized Difference Water Index (MNDWI)
|
|
143
|
+
- Normalized Difference Vegetation Index (NDVI)
|
|
144
|
+
- Enhanced Vegetation Index (EVI)
|
|
145
|
+
- Soil Adjusted Vegetation Index (SAVI)
|
|
146
|
+
- Modified Soil Adjusted Vegetation Index (MSAVI)
|
|
147
|
+
- Normalized Difference Moisture Index (NDMI)
|
|
148
|
+
- Normalized Difference Turbidity Index (NDTI)
|
|
149
|
+
- Chlorophyll-a Index (different for Landsat vs Sentinel-2)
|
|
150
|
+
- Normalized Burn Ratio (NBR)
|
|
151
|
+
- Normalized Difference Snow Index (NDSI)
|
|
152
|
+
- Land Surface Temperature (LST) in Celsius (Landsat only)
|
|
153
|
+
- Halite Index (Radwin & Bowen, 2021)
|
|
154
|
+
- Gypsum Index (modified from Radwin & Bowen, 2021)
|
|
155
|
+
- Broadband Albedo
|
|
156
|
+
|
|
157
|
+
|
|
135
158
|
|
|
136
159
|
Features of `RadGEEToolbox` will be expanded in the future - if there is something you would like to see implemented in `RadGEEToolbox`, please open an issue or discussion on GitHub.
|
|
137
160
|
|
|
@@ -149,15 +172,15 @@ _____________
|
|
|
149
172
|
|
|
150
173
|
### Installing via pip
|
|
151
174
|
|
|
152
|
-
To install `RadGEEToolbox` version 1.6.
|
|
175
|
+
To install `RadGEEToolbox` version 1.6.8 using pip (NOTE: it is recommended to create a new virtual environment):
|
|
153
176
|
|
|
154
177
|
```bash
|
|
155
|
-
pip install RadGEEToolbox==1.6.
|
|
178
|
+
pip install RadGEEToolbox==1.6.8
|
|
156
179
|
```
|
|
157
180
|
|
|
158
181
|
### Installing via Conda
|
|
159
182
|
|
|
160
|
-
To install `RadGEEToolbox` version 1.6.
|
|
183
|
+
To install `RadGEEToolbox` version 1.6.8 using conda-forge (NOTE: it is recommended to create a new virtual environment):
|
|
161
184
|
|
|
162
185
|
```bash
|
|
163
186
|
conda install conda-forge::radgeetoolbox
|
|
@@ -188,7 +211,7 @@ To verify that `RadGEEToolbox` was installed correctly:
|
|
|
188
211
|
python -c "import RadGEEToolbox; print(RadGEEToolbox.__version__)"
|
|
189
212
|
```
|
|
190
213
|
|
|
191
|
-
You should see `1.6.
|
|
214
|
+
You should see `1.6.8` printed as the version number.
|
|
192
215
|
|
|
193
216
|
### Want to Visualize Data? Install These Too
|
|
194
217
|
|
|
@@ -278,7 +301,7 @@ calculate_water_area = cloud_masked_NDWI_collection.PixelAreaSumCollection(
|
|
|
278
301
|
threshold=0, #binary classification threshold for unclassified rasters,
|
|
279
302
|
scale=90 #pixel size for zonal statistics
|
|
280
303
|
)
|
|
281
|
-
water_area_time_series = calculate_water_area.
|
|
304
|
+
water_area_time_series = calculate_water_area.ExtractProperties('ndwi')
|
|
282
305
|
print('List of square meters of water in images:', water_area_time_series)
|
|
283
306
|
```
|
|
284
307
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
RadGEEToolbox/CollectionStitch.py,sha256=dLRzJZLZ1QTJqqbWPElyTjxb1m0T_WuBTo6wNzcCXq4,3884
|
|
2
|
+
RadGEEToolbox/GetPalette.py,sha256=YpAE9lzI5aXWHJKs1SXwZ62e8nKo8zfjKSpz5oJQSA8,2872
|
|
3
|
+
RadGEEToolbox/LandsatCollection.py,sha256=_ATVLz_7NDYbPZeg1mpk9RVltI9RA9H001phS71uHns,145106
|
|
4
|
+
RadGEEToolbox/Sentinel1Collection.py,sha256=zd5XlxOZk80SeCN7OlOlpJfYstfXD90EawIWD9Mvghs,86192
|
|
5
|
+
RadGEEToolbox/Sentinel2Collection.py,sha256=EGKq2bREsge7LCXrBmcVNFUafHIzykj9QajZmLmimb8,115660
|
|
6
|
+
RadGEEToolbox/VisParams.py,sha256=4aQV4l_IA-CjMBUXYDDLQ2fQyA3USSRN0A3VY07dGQ8,8571
|
|
7
|
+
RadGEEToolbox/__init__.py,sha256=Ij9uuIlvwFR39Ms6xYq5kih7AdjmO0366kYnME_KTsI,530
|
|
8
|
+
radgeetoolbox-1.6.8.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
|
|
9
|
+
radgeetoolbox-1.6.8.dist-info/METADATA,sha256=xAnfdPUVfPG54h5dJIiiYxHodaECGTeOMN5NmdVMvjw,15571
|
|
10
|
+
radgeetoolbox-1.6.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
radgeetoolbox-1.6.8.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
|
|
12
|
+
radgeetoolbox-1.6.8.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
RadGEEToolbox/CollectionStitch.py,sha256=dLRzJZLZ1QTJqqbWPElyTjxb1m0T_WuBTo6wNzcCXq4,3884
|
|
2
|
-
RadGEEToolbox/GetPalette.py,sha256=YpAE9lzI5aXWHJKs1SXwZ62e8nKo8zfjKSpz5oJQSA8,2872
|
|
3
|
-
RadGEEToolbox/LandsatCollection.py,sha256=2skMdsbfmWIbZCXBBNYRZndNqXHbhw7jHIznwd9-RJU,98084
|
|
4
|
-
RadGEEToolbox/Sentinel1Collection.py,sha256=HhLNOj-m4eFtori7XvUUiYmYapNMdGteio7okSkAXu8,65111
|
|
5
|
-
RadGEEToolbox/Sentinel2Collection.py,sha256=aogopvqHm2_HUYmjPVSJeORddnJ7utiwfa2xbYHQMeI,76697
|
|
6
|
-
RadGEEToolbox/VisParams.py,sha256=p3ZdCrgK3yWjFQ7QH-b0tVVC7CyaLBsfZrEDOPIUkt4,5138
|
|
7
|
-
RadGEEToolbox/__init__.py,sha256=1LNc9K_1s0kRh97DTbk2t8Nv6VOv1UHOPVgf_UCnpQo,530
|
|
8
|
-
radgeetoolbox-1.6.7.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
|
|
9
|
-
radgeetoolbox-1.6.7.dist-info/METADATA,sha256=gU42KxHK_Ng8Z746k6K5uzLK8-mDra_pjmh4CV5dhOY,14637
|
|
10
|
-
radgeetoolbox-1.6.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
-
radgeetoolbox-1.6.7.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
|
|
12
|
-
radgeetoolbox-1.6.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|