RadGEEToolbox 1.6.4__py3-none-any.whl → 1.6.6__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.
@@ -1,6 +1,10 @@
1
1
  import ee
2
2
  from .GetPalette import get_palette
3
- def get_visualization_params(satellite, index, min_val=None, max_val=None, palette=None):
3
+
4
+
5
+ def get_visualization_params(
6
+ satellite, index, min_val=None, max_val=None, palette=None
7
+ ):
4
8
  """
5
9
  Function to define visualization paramaters for image visualization. Outputs an vis_params dictionary.
6
10
 
@@ -15,119 +19,115 @@ def get_visualization_params(satellite, index, min_val=None, max_val=None, palet
15
19
  dictionary: vis_params dictionary to be used when visualizing an image on a map. Supplies min, max, band(s), and color palette (when appropriate).
16
20
  """
17
21
  # Define visualization parameters for various image types
18
- if satellite == 'Landsat' or satellite == 'landsat':
22
+ if satellite == "Landsat" or satellite == "landsat":
19
23
  params_dict = {
20
- 'TrueColor': {
21
- 'min': 0,
22
- 'max': 30000,
23
- 'bands': ['SR_B4', 'SR_B3', 'SR_B2']
24
+ "TrueColor": {"min": 0, "max": 30000, "bands": ["SR_B4", "SR_B3", "SR_B2"]},
25
+ "NDVI": {
26
+ "min": 0,
27
+ "max": 0.5,
28
+ "bands": ["ndvi"],
29
+ "palette": get_palette("greens"),
24
30
  },
25
- 'NDVI': {
26
- 'min': 0,
27
- 'max': 0.5,
28
- 'bands': ['ndvi'],
29
- 'palette': get_palette('greens')
31
+ "NDWI": {
32
+ "min": -0.2,
33
+ "max": 0.2,
34
+ "bands": ["ndwi"],
35
+ "palette": get_palette("inferno"),
30
36
  },
31
- 'NDWI': {
32
- 'min': -0.2,
33
- 'max': 0.2,
34
- 'bands': ['ndwi'],
35
- 'palette': get_palette('inferno')
37
+ "halite": {
38
+ "min": 0.1,
39
+ "max": 0.5,
40
+ "bands": ["halite"],
41
+ "palette": get_palette("haline"),
36
42
  },
37
- 'halite': {
38
- 'min': 0.1,
39
- 'max': 0.5,
40
- 'bands': ['halite'],
41
- 'palette': get_palette('haline')
43
+ "gypsum": {
44
+ "min": 0.0,
45
+ "max": 0.5,
46
+ "bands": ["gypsum"],
47
+ "palette": get_palette("ylord"),
42
48
  },
43
- 'gypsum': {
44
- 'min': 0.0,
45
- 'max': 0.5,
46
- 'bands': ['gypsum'],
47
- 'palette': get_palette('ylord')
49
+ "LST": {
50
+ "min": 0,
51
+ "max": 40,
52
+ "bands": ["LST"],
53
+ "palette": get_palette("thermal"),
48
54
  },
49
- 'LST': {
50
- 'min': 0,
51
- 'max': 40,
52
- 'bands': ['LST'],
53
- 'palette': get_palette('thermal')
55
+ "NDTI": {
56
+ "min": -0.2,
57
+ "max": 0.2,
58
+ "bands": ["ndti"],
59
+ "palette": get_palette("turbid"),
54
60
  },
55
- 'NDTI': {
56
- 'min': -0.2,
57
- 'max': 0.2,
58
- 'bands': ['ndti'],
59
- 'palette': get_palette('turbid')
60
- },
61
- 'KIVU': {
62
- 'min': -0.5,
63
- 'max': 0.2,
64
- 'bands': ['kivu'],
65
- 'palette': get_palette('algae')
61
+ "KIVU": {
62
+ "min": -0.5,
63
+ "max": 0.2,
64
+ "bands": ["kivu"],
65
+ "palette": get_palette("algae"),
66
66
  },
67
67
  }
68
- elif satellite == 'Sentinel2' or satellite == 'sentinel2':
68
+ elif satellite == "Sentinel2" or satellite == "sentinel2":
69
69
  params_dict = {
70
- 'TrueColor': {
71
- 'min': 0,
72
- 'max': 3500,
73
- 'bands': ['B4', 'B3', 'B2']
74
- },
75
- 'NDVI': {
76
- 'min': 0.5,
77
- 'max': 0.9,
78
- 'bands': ['ndvi'],
79
- 'palette': get_palette('greens')
70
+ "TrueColor": {"min": 0, "max": 3500, "bands": ["B4", "B3", "B2"]},
71
+ "NDVI": {
72
+ "min": 0.5,
73
+ "max": 0.9,
74
+ "bands": ["ndvi"],
75
+ "palette": get_palette("greens"),
80
76
  },
81
- 'NDWI': {
82
- 'min': -0.2,
83
- 'max': 0.2,
84
- 'bands': ['ndwi'],
85
- 'palette': get_palette('inferno')
77
+ "NDWI": {
78
+ "min": -0.2,
79
+ "max": 0.2,
80
+ "bands": ["ndwi"],
81
+ "palette": get_palette("inferno"),
86
82
  },
87
- 'halite': {
88
- 'min': 0.1,
89
- 'max': 0.7,
90
- 'bands': ['halite'],
91
- 'palette': get_palette('haline')
83
+ "halite": {
84
+ "min": 0.1,
85
+ "max": 0.7,
86
+ "bands": ["halite"],
87
+ "palette": get_palette("haline"),
92
88
  },
93
- 'gypsum': {
94
- 'min': 0.0,
95
- 'max': 0.7,
96
- 'bands': ['gypsum'],
97
- 'palette': get_palette('ylord')
89
+ "gypsum": {
90
+ "min": 0.0,
91
+ "max": 0.7,
92
+ "bands": ["gypsum"],
93
+ "palette": get_palette("ylord"),
98
94
  },
99
- 'NDTI': {
100
- 'min': -0.2,
101
- 'max': 0.5,
102
- 'bands': ['ndti'],
103
- 'palette': get_palette('turbid')
95
+ "NDTI": {
96
+ "min": -0.2,
97
+ "max": 0.5,
98
+ "bands": ["ndti"],
99
+ "palette": get_palette("turbid"),
104
100
  },
105
- '2BDA': {
106
- 'min': 0.5,
107
- 'max': 1.75,
108
- 'bands': ['2BDA'],
109
- 'palette': get_palette('algae')
101
+ "2BDA": {
102
+ "min": 0.5,
103
+ "max": 1.75,
104
+ "bands": ["2BDA"],
105
+ "palette": get_palette("algae"),
110
106
  },
111
107
  }
112
108
  else:
113
- raise ValueError("Incorrect definition of satellite. Options: 'Landsat', 'landsat', 'Sentinel2', or 'sentinel2'")
109
+ raise ValueError(
110
+ "Incorrect definition of satellite. Options: 'Landsat', 'landsat', 'Sentinel2', or 'sentinel2'"
111
+ )
114
112
 
115
113
  # Get default visualization parameters for the given image name
116
114
  params = params_dict.get(index, None)
117
115
  if params is None:
118
- raise ValueError("Incorrect definition of index. Options: 'TrueColor', 'NDVI', 'NDWI', 'halite', 'gypsum', 'LST', 'NDTI', or 'KIVU'. Note LST is not available for Sentinel2")
116
+ raise ValueError(
117
+ "Incorrect definition of index. Options: 'TrueColor', 'NDVI', 'NDWI', 'halite', 'gypsum', 'LST', 'NDTI', or 'KIVU'. Note LST is not available for Sentinel2"
118
+ )
119
119
 
120
120
  # Override default values if provided by the user
121
121
  if min_val is not None:
122
- params['min'] = min_val
122
+ params["min"] = min_val
123
123
  if max_val is not None:
124
- params['max'] = max_val
124
+ params["max"] = max_val
125
125
  if palette is not None:
126
126
  # Check if palette is a string and get the palette list if it is
127
127
  if isinstance(palette, str):
128
128
  palette = get_palette(palette)
129
129
  if palette is None:
130
130
  raise ValueError(f"Palette {palette} not found.")
131
- params['palette'] = palette
131
+ params["palette"] = palette
132
132
 
133
133
  return params
RadGEEToolbox/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "1.6.4"
1
+ __version__ = "1.6.6"
2
2
 
3
3
  from .CollectionStitch import CollectionStitch, MosaicByDate
4
4
  from .GetPalette import get_palette
@@ -14,5 +14,5 @@ __all__ = [
14
14
  "LandsatCollection",
15
15
  "Sentinel1Collection",
16
16
  "Sentinel2Collection",
17
- "get_visualization_params"
17
+ "get_visualization_params",
18
18
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RadGEEToolbox
3
- Version: 1.6.4
3
+ Version: 1.6.6
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
@@ -41,6 +41,23 @@ Dynamic: requires-python
41
41
 
42
42
  Designed for both new and advanced users of Google Earth Engine, RadGEEToolbox minimizes repetitive scripting, accelerates common remote sensing workflows, and aims to maximize efficiency within the constraints of the Google Earth Engine API. Whether you’re building a time series of vegetation indices or extracting surface properties along transects, this package helps get results faster.
43
43
 
44
+ Although similar packages exist (eemont, geetools, etc.), `RadGEEToolbox` extends functionality and provides cohesive, chainable methods for research oriented projects working with Landsat TM & OLI, Sentinel-1 SAR, and/or Sentinel-2 MSI datasets (Table 1). The ultimate goal of `RadGEEToolbox` is to make satellite image processing easier and faster for real world applications relying on the most commonly utilized remote sensing platforms.
45
+
46
+ ***Table 1.*** *Comparison of functionality between RadGEEToolbox, eemont, and geetools.*
47
+
48
+ | Capability | **RadGEEToolbox** | **eemont** | **geetools** |
49
+ |---|:---:|:---:|:---:|
50
+ | **Dataset & Workflow Specific API's** | **YES** | NO | NO |
51
+ | **Synthetic Aperture Radar (S1) Support** | **YES** | NO | NO |
52
+ | **Zonal Time-series Extraction** | **YES** | **YES** | **YES** |
53
+ | **Area Time-series Extraction** | **YES** | NO | NO |
54
+ | **Transect Time-series Extraction** | **YES** | NO | NO |
55
+ | **Comprehensive Preprocessing Operations** | **YES** | **YES** | **YES** |
56
+ | **Reflectance Scaling (DN to ρ)** | **YES** | **YES** | **YES** |
57
+ | **Land Surface Temperature Calculation (Landsat)** | **YES** | NO | NO |
58
+ | **Image Selection by Date or Index** | **YES** | **YES** | NO |
59
+ | **Visualization Presets/Tools** | **YES** | NO | NO |
60
+
44
61
  _________
45
62
  ## Getting Started with Google Earth Engine
46
63
 
@@ -116,6 +133,8 @@ _________
116
133
  - Easy conversion between RadGEEToolbox and standard Earth Engine objects
117
134
  - Server-side–friendly workflows and caching for faster, scalable processing
118
135
 
136
+ 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
+
119
138
  🔍 For a full breakdown of available tools, see the [RadGEEToolbox documentation »](https://radgeetoolbox.readthedocs.io/en/latest/)
120
139
 
121
140
  _____________
@@ -124,21 +143,21 @@ _____________
124
143
 
125
144
  ### Prerequisites
126
145
 
127
- - **Python**: Ensure you have version 3.6 or higher installed.
146
+ - **Python**: Ensure you have version 3.8 or higher installed.
128
147
  - **pip**: This is Python's package installer.
129
148
  - **conda-forge**: Community led Conda package installer channel
130
149
 
131
150
  ### Installing via pip
132
151
 
133
- To install `RadGEEToolbox` version 1.6.4 using pip (NOTE: it is recommended to create a new virtual environment):
152
+ To install `RadGEEToolbox` version 1.6.6 using pip (NOTE: it is recommended to create a new virtual environment):
134
153
 
135
154
  ```bash
136
- pip install RadGEEToolbox==1.6.4
155
+ pip install RadGEEToolbox==1.6.6
137
156
  ```
138
157
 
139
158
  ### Installing via Conda
140
159
 
141
- To install `RadGEEToolbox` version 1.6.4 using conda-forge (NOTE: it is recommended to create a new virtual environment):
160
+ To install `RadGEEToolbox` version 1.6.6 using conda-forge (NOTE: it is recommended to create a new virtual environment):
142
161
 
143
162
  ```bash
144
163
  conda install conda-forge::radgeetoolbox
@@ -169,7 +188,7 @@ To verify that `RadGEEToolbox` was installed correctly:
169
188
  python -c "import RadGEEToolbox; print(RadGEEToolbox.__version__)"
170
189
  ```
171
190
 
172
- You should see `1.6.4` printed as the version number.
191
+ You should see `1.6.6` printed as the version number.
173
192
 
174
193
  ### Want to Visualize Data? Install These Too
175
194
 
@@ -0,0 +1,12 @@
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=1M1YKiupmb1euHZD9iwz9cQ74LfWhz5ak7mOVyO-zpA,530
8
+ radgeetoolbox-1.6.6.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
9
+ radgeetoolbox-1.6.6.dist-info/METADATA,sha256=dJtdy3fpy8SD0SNqoLDGQ2a1FMgGCL89cFuVIQj4xT4,14624
10
+ radgeetoolbox-1.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ radgeetoolbox-1.6.6.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
12
+ radgeetoolbox-1.6.6.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- RadGEEToolbox/CollectionStitch.py,sha256=ojat9aY-zJm4mK3FukKFTVRjp64x0EuY6O_1hbCXLNg,3759
2
- RadGEEToolbox/GetPalette.py,sha256=kF28nTw-iPxY4DEBtZSTGsOEGAsezmUPlJH4NVkF3vI,1666
3
- RadGEEToolbox/LandsatCollection.py,sha256=Tq-hwFPolqZI1rL-ORS5dPcjBa3QGEy2ruhc_Tk4hRI,85995
4
- RadGEEToolbox/Sentinel1Collection.py,sha256=Z32YszIUC_eswMtravMGrNHCP0RA5LK_qyPHQT6stVk,62040
5
- RadGEEToolbox/Sentinel2Collection.py,sha256=6jx5sMKKDgkr6okQzDQogUBE6t_aBubViZ1OIuIt5K8,67494
6
- RadGEEToolbox/VisParams.py,sha256=knGnu0zdxkDC1jqvgybNUKUY5IrJaQGgd-7j4odcRQE,5197
7
- RadGEEToolbox/__init__.py,sha256=MX7VgyxgYIAxrfaQxbaaZEglyvTW3wBA12wxnOIKGwE,529
8
- radgeetoolbox-1.6.4.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
9
- radgeetoolbox-1.6.4.dist-info/METADATA,sha256=019SC35uCcB2VuzwWBrhf9nzjLE9ThpxiiDREJkUaP4,13145
10
- radgeetoolbox-1.6.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- radgeetoolbox-1.6.4.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
12
- radgeetoolbox-1.6.4.dist-info/RECORD,,