RadGEEToolbox 1.6.3__tar.gz → 1.6.5__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 (20) hide show
  1. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/PKG-INFO +26 -7
  2. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/README.md +24 -5
  3. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox/CollectionStitch.py +20 -10
  4. radgeetoolbox-1.6.5/RadGEEToolbox/GetPalette.py +120 -0
  5. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox/LandsatCollection.py +924 -359
  6. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox/Sentinel1Collection.py +568 -292
  7. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox/Sentinel2Collection.py +685 -258
  8. radgeetoolbox-1.6.5/RadGEEToolbox/VisParams.py +133 -0
  9. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox/__init__.py +2 -2
  10. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox.egg-info/PKG-INFO +26 -7
  11. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/pyproject.toml +2 -2
  12. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/setup.py +2 -2
  13. radgeetoolbox-1.6.3/RadGEEToolbox/GetPalette.py +0 -26
  14. radgeetoolbox-1.6.3/RadGEEToolbox/VisParams.py +0 -133
  15. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/LICENSE.txt +0 -0
  16. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox.egg-info/SOURCES.txt +0 -0
  17. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox.egg-info/dependency_links.txt +0 -0
  18. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox.egg-info/requires.txt +0 -0
  19. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/RadGEEToolbox.egg-info/top_level.txt +0 -0
  20. {radgeetoolbox-1.6.3 → radgeetoolbox-1.6.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RadGEEToolbox
3
- Version: 1.6.3
3
+ Version: 1.6.5
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
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Topic :: Scientific/Engineering :: GIS
17
17
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
18
18
  Classifier: Operating System :: OS Independent
19
- Requires-Python: >=3.6
19
+ Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE.txt
22
22
  Requires-Dist: earthengine-api
@@ -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.3 using pip (NOTE: it is recommended to create a new virtual environment):
152
+ To install `RadGEEToolbox` version 1.6.5 using pip (NOTE: it is recommended to create a new virtual environment):
134
153
 
135
154
  ```bash
136
- pip install RadGEEToolbox==1.6.3
155
+ pip install RadGEEToolbox==1.6.5
137
156
  ```
138
157
 
139
158
  ### Installing via Conda
140
159
 
141
- To install `RadGEEToolbox` version 1.6.3 using conda-forge (NOTE: it is recommended to create a new virtual environment):
160
+ To install `RadGEEToolbox` version 1.6.5 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.3` printed as the version number.
191
+ You should see `1.6.5` printed as the version number.
173
192
 
174
193
  ### Want to Visualize Data? Install These Too
175
194
 
@@ -12,6 +12,23 @@
12
12
 
13
13
  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.
14
14
 
15
+ 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.
16
+
17
+ ***Table 1.*** *Comparison of functionality between RadGEEToolbox, eemont, and geetools.*
18
+
19
+ | Capability | **RadGEEToolbox** | **eemont** | **geetools** |
20
+ |---|:---:|:---:|:---:|
21
+ | **Dataset & Workflow Specific API's** | **YES** | NO | NO |
22
+ | **Synthetic Aperture Radar (S1) Support** | **YES** | NO | NO |
23
+ | **Zonal Time-series Extraction** | **YES** | **YES** | **YES** |
24
+ | **Area Time-series Extraction** | **YES** | NO | NO |
25
+ | **Transect Time-series Extraction** | **YES** | NO | NO |
26
+ | **Comprehensive Preprocessing Operations** | **YES** | **YES** | **YES** |
27
+ | **Reflectance Scaling (DN to ρ)** | **YES** | **YES** | **YES** |
28
+ | **Land Surface Temperature Calculation (Landsat)** | **YES** | NO | NO |
29
+ | **Image Selection by Date or Index** | **YES** | **YES** | NO |
30
+ | **Visualization Presets/Tools** | **YES** | NO | NO |
31
+
15
32
  _________
16
33
  ## Getting Started with Google Earth Engine
17
34
 
@@ -87,6 +104,8 @@ _________
87
104
  - Easy conversion between RadGEEToolbox and standard Earth Engine objects
88
105
  - Server-side–friendly workflows and caching for faster, scalable processing
89
106
 
107
+ 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.
108
+
90
109
  🔍 For a full breakdown of available tools, see the [RadGEEToolbox documentation »](https://radgeetoolbox.readthedocs.io/en/latest/)
91
110
 
92
111
  _____________
@@ -95,21 +114,21 @@ _____________
95
114
 
96
115
  ### Prerequisites
97
116
 
98
- - **Python**: Ensure you have version 3.6 or higher installed.
117
+ - **Python**: Ensure you have version 3.8 or higher installed.
99
118
  - **pip**: This is Python's package installer.
100
119
  - **conda-forge**: Community led Conda package installer channel
101
120
 
102
121
  ### Installing via pip
103
122
 
104
- To install `RadGEEToolbox` version 1.6.3 using pip (NOTE: it is recommended to create a new virtual environment):
123
+ To install `RadGEEToolbox` version 1.6.5 using pip (NOTE: it is recommended to create a new virtual environment):
105
124
 
106
125
  ```bash
107
- pip install RadGEEToolbox==1.6.3
126
+ pip install RadGEEToolbox==1.6.5
108
127
  ```
109
128
 
110
129
  ### Installing via Conda
111
130
 
112
- To install `RadGEEToolbox` version 1.6.3 using conda-forge (NOTE: it is recommended to create a new virtual environment):
131
+ To install `RadGEEToolbox` version 1.6.5 using conda-forge (NOTE: it is recommended to create a new virtual environment):
113
132
 
114
133
  ```bash
115
134
  conda install conda-forge::radgeetoolbox
@@ -140,7 +159,7 @@ To verify that `RadGEEToolbox` was installed correctly:
140
159
  python -c "import RadGEEToolbox; print(RadGEEToolbox.__version__)"
141
160
  ```
142
161
 
143
- You should see `1.6.3` printed as the version number.
162
+ You should see `1.6.5` printed as the version number.
144
163
 
145
164
  ### Want to Visualize Data? Install These Too
146
165
 
@@ -1,7 +1,9 @@
1
1
  import ee
2
+
3
+
2
4
  def CollectionStitch(img_col1, img_col2, copy_properties_from=1):
3
5
  """
4
- Function to mosaic two RadGEETools image collection objects which share image dates.
6
+ Function to mosaic two RadGEETools image collection objects which share image dates.
5
7
  Mosaics are only formed for dates where both image collections have images. Server-side friendly.
6
8
  Returned image collection is an eeImageCollection object. NOTE this is different from the CollectionStitch function available in the LandsatCollection and SentinelCollection classes.
7
9
 
@@ -23,17 +25,24 @@ def CollectionStitch(img_col1, img_col2, copy_properties_from=1):
23
25
  filtered_col2 = img_col2.image_grab(img_col2.dates_list.index(date))
24
26
  merged_col = ee.ImageCollection.fromImages([filtered_col1, filtered_col2])
25
27
  if copy_properties_from == 1:
26
- mosaic = merged_col.mosaic().copyProperties(filtered_col1) # new collection images contain all image properties of the northern landsat image
28
+ mosaic = merged_col.mosaic().copyProperties(
29
+ filtered_col1
30
+ ) # new collection images contain all image properties of the northern landsat image
27
31
  elif copy_properties_from == 2:
28
- mosaic = merged_col.mosaic().copyProperties(filtered_col2) # new collection images contain all image properties of the southern landsat image
32
+ mosaic = merged_col.mosaic().copyProperties(
33
+ filtered_col2
34
+ ) # new collection images contain all image properties of the southern landsat image
29
35
  else:
30
- raise ValueError("Invalid value for 'copy_properties_from'. Must be 1 or 2.") # new collection images contain all image properties of the northern landsat image
36
+ raise ValueError(
37
+ "Invalid value for 'copy_properties_from'. Must be 1 or 2."
38
+ ) # new collection images contain all image properties of the northern landsat image
31
39
  image_list.append(mosaic)
32
40
  else:
33
41
  None # If the condition isn't met, do nothing and keep going through the list
34
42
  new_col = ee.ImageCollection.fromImages(image_list)
35
43
  return new_col
36
44
 
45
+
37
46
  def MosaicByDate(img_col):
38
47
  """
39
48
  Function to mosaic collection images that share the same date. Server-side friendly. Requires images to have date property of "Date_Filter"
@@ -45,20 +54,21 @@ def MosaicByDate(img_col):
45
54
  ee.ImageCollection: ee.ImageCollection with mosaiced imagery
46
55
  """
47
56
  input_collection = img_col
48
- # Function to mosaic images of the same date and accumulate them
57
+
58
+ # Function to mosaic images of the same date and accumulate them
49
59
  def mosaic_and_accumulate(date, list_accumulator):
50
60
  # date = ee.Date(date)
51
61
  list_accumulator = ee.List(list_accumulator)
52
- date_filter = ee.Filter.eq('Date_Filter', date)
62
+ date_filter = ee.Filter.eq("Date_Filter", date)
53
63
  date_collection = input_collection.filter(date_filter)
54
-
64
+
55
65
  # Create mosaic
56
- mosaic = date_collection.mosaic().set('Date_Filter', date)
66
+ mosaic = date_collection.mosaic().set("Date_Filter", date)
57
67
 
58
68
  return list_accumulator.add(mosaic)
59
69
 
60
70
  # Get distinct dates
61
- distinct_dates = input_collection.aggregate_array('Date_Filter').distinct()
71
+ distinct_dates = input_collection.aggregate_array("Date_Filter").distinct()
62
72
 
63
73
  # Initialize an empty list as the accumulator
64
74
  initial = ee.List([])
@@ -69,4 +79,4 @@ def MosaicByDate(img_col):
69
79
  new_col = ee.ImageCollection.fromImages(mosaic_list)
70
80
 
71
81
  # Convert the list of mosaics to an ImageCollection
72
- return new_col
82
+ return new_col
@@ -0,0 +1,120 @@
1
+ def get_palette(name):
2
+ """
3
+ Returns the color palette associated with the given name.
4
+
5
+ Args:
6
+ name (str): options are 'algae', 'dense', 'greens', 'haline', 'inferno', 'jet', 'matter', 'pubu', 'soft_blue_green_red', 'thermal', 'turbid', 'ylord'
7
+
8
+ Returns:
9
+ list: list of colors to be used for image visualization in GEE vis params
10
+
11
+ """
12
+ palettes = {
13
+ "jet": [
14
+ "#00007F",
15
+ "#002AFF",
16
+ "#00D4FF",
17
+ "#7FFF7F",
18
+ "#FFD400",
19
+ "#FF2A00",
20
+ "#7F0000",
21
+ ],
22
+ "soft_blue_green_red": ["#deeaee", "#b1cbbb", "#eea29a", "#c94c4c"],
23
+ "inferno": [
24
+ "#000004",
25
+ "#320A5A",
26
+ "#781B6C",
27
+ "#BB3654",
28
+ "#EC6824",
29
+ "#FBB41A",
30
+ "#FCFFA4",
31
+ ],
32
+ "thermal": [
33
+ "#042333",
34
+ "#2c3395",
35
+ "#744992",
36
+ "#b15f82",
37
+ "#eb7958",
38
+ "#fbb43d",
39
+ "#e8fa5b",
40
+ ],
41
+ "algae": [
42
+ "#d7f9d0",
43
+ "#a2d595",
44
+ "#64b463",
45
+ "#129450",
46
+ "#126e45",
47
+ "#1a482f",
48
+ "#122414",
49
+ ],
50
+ "turbid": [
51
+ "#e9f6ab",
52
+ "#d3c671",
53
+ "#bf9747",
54
+ "#a1703b",
55
+ "#795338",
56
+ "#4d392d",
57
+ "#221f1b",
58
+ ],
59
+ "dense": [
60
+ "#e6f1f1",
61
+ "#a2cee2",
62
+ "#76a4e5",
63
+ "#7871d5",
64
+ "#7642a5",
65
+ "#621d62",
66
+ "#360e24",
67
+ ],
68
+ "matter": [
69
+ "#feedb0",
70
+ "#f7b37c",
71
+ "#eb7858",
72
+ "#ce4356",
73
+ "#9f2462",
74
+ "#66185c",
75
+ "#2f0f3e",
76
+ ],
77
+ "haline": [
78
+ "#2a186c",
79
+ "14439c",
80
+ "#206e8b",
81
+ "#3c9387",
82
+ "#5ab978",
83
+ "#aad85c",
84
+ "#fdef9a",
85
+ ],
86
+ "ylord": [
87
+ "#ffffcc",
88
+ "#ffeda0",
89
+ "#fed976",
90
+ "#feb24c",
91
+ "#fd8d3c",
92
+ "#fc4e2a",
93
+ "#e31a1c",
94
+ "#bd0026",
95
+ "#800026",
96
+ ],
97
+ "pubu": [
98
+ "#fff7fb",
99
+ "#ece7f2",
100
+ "#d0d1e6",
101
+ "#a6bddb",
102
+ "#74a9cf",
103
+ "#3690c0",
104
+ "#0570b0",
105
+ "#045a8d",
106
+ "#023858",
107
+ ][::-1],
108
+ "greens": [
109
+ "#f7fcf5",
110
+ "#e5f5e0",
111
+ "#c7e9c0",
112
+ "#a1d99b",
113
+ "#74c476",
114
+ "#41ab5d",
115
+ "#238b45",
116
+ "#006d2c",
117
+ "#00441b",
118
+ ],
119
+ }
120
+ return palettes.get(name, None)