RadGEEToolbox 1.6.2__py3-none-any.whl → 1.6.3__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/__init__.py CHANGED
@@ -1,6 +1,18 @@
1
+ __version__ = "1.6.3"
2
+
1
3
  from .CollectionStitch import CollectionStitch, MosaicByDate
2
4
  from .GetPalette import get_palette
3
5
  from .LandsatCollection import LandsatCollection
4
6
  from .Sentinel1Collection import Sentinel1Collection
5
7
  from .Sentinel2Collection import Sentinel2Collection
6
- from .VisParams import get_visualization_params
8
+ from .VisParams import get_visualization_params
9
+
10
+ __all__ = [
11
+ "CollectionStitch",
12
+ "MosaicByDate",
13
+ "get_palette",
14
+ "LandsatCollection",
15
+ "Sentinel1Collection",
16
+ "Sentinel2Collection",
17
+ "get_visualization_params"
18
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RadGEEToolbox
3
- Version: 1.6.2
3
+ Version: 1.6.3
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
@@ -31,7 +31,7 @@ Dynamic: requires-python
31
31
 
32
32
  # RadGEEToolbox 🛠
33
33
 
34
- ![](image-1.png)
34
+ ![](ReadMeCover.png)
35
35
 
36
36
  ### 🌎 Streamlined Multispectral & SAR Analysis for Google Earth Engine Python API
37
37
 
@@ -41,6 +41,69 @@ 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
+ _________
45
+ ## Getting Started with Google Earth Engine
46
+
47
+ **RadGEEToolbox requires [access](https://developers.google.com/earth-engine/guides/access) to [Google Earth Engine (GEE)](https://earthengine.google.com/) and proper [authentication](https://developers.google.com/earth-engine/guides/auth) with the Python API.**
48
+
49
+ For more details, see the official [Google Earth Engine Python API Getting Started Guide](https://developers.google.com/earth-engine/guides/quickstart_python) or [Python Installation Guide](https://developers.google.com/earth-engine/guides/python_install).
50
+
51
+
52
+ ### 1. Sign Up for Earth Engine
53
+ Apply for access here: [https://earthengine.google.com/signup/](https://earthengine.google.com/signup/) using a Google account. Approval typically takes a few days.
54
+
55
+ ### 2. Install the Earth Engine Python API
56
+ **The Earth Engine API is installed automatically when you install `RadGEEToolbox`.** However, if you would like to install manually:
57
+
58
+ ```bash
59
+ pip install earthengine-api
60
+ ```
61
+
62
+ ### 3. Authenticate & Initialize
63
+ Prior to using the Earth Engine Python client library, you need to authenticate and use the resultant credentials to initialize the Python client. The authentication flows use Cloud Projects to authenticate, and they're used for unpaid (free, noncommercial) use as well as paid use.
64
+
65
+
66
+ **Run the following during your first use:**
67
+ ```python
68
+ import ee
69
+ ee.Authenticate()
70
+ ```
71
+ ***NOTE: Your GEE credentials will not permanantly be stored on your PC and you will periodically need to re-run `ee.Authenticate()` when `ee.Initialize()` returns an authentication error.***
72
+
73
+ `ee.Autheticate()` will select the best authentication mode for your environment, and prompt you to confirm access for your scripts. To initialize, you will need to provide a project that you own, or have permissions to use. This project will be used for running all Earth Engine operations:
74
+
75
+ ```python
76
+ ee.Initialize(project='my-project')
77
+ ```
78
+ Replacing 'my-project' with the name of the Google Cloud Project you created on sign-up or any Google Cloud Project that has the GEE API enabled.
79
+
80
+ ### 4. Authentication Best Practices
81
+ It is reccomended to use the following authentication procedure once you have completed your initial authentication:
82
+ ```python
83
+ import ee
84
+
85
+ try:
86
+ ee.Initialize()
87
+ except Exception as e:
88
+ ee.Authenticate()
89
+ ee.Initialize()
90
+ ```
91
+
92
+ ### 5. Troubleshooting
93
+ `AttributeError: module 'ee' has no attribute 'Initialize'`
94
+
95
+ ➤ Ensure that earthengine-api is installed properly.
96
+
97
+ `403 Access Denied`
98
+
99
+ ➤ Your GEE account might not be approved, or the API is not enabled for your project.
100
+
101
+ `Initialization fails`
102
+
103
+ ➤ Try using `ee.Initialize(project='your-project-id')` explicitly in case you are just calling `ee.Initialize()`
104
+
105
+ See the official [GEE documentation for authentication »](https://developers.google.com/earth-engine/guides/auth)
106
+
44
107
  _________
45
108
 
46
109
  ## Key Features
@@ -67,15 +130,15 @@ _____________
67
130
 
68
131
  ### Installing via pip
69
132
 
70
- To install `RadGEEToolbox` version 1.6.2 using pip (NOTE: it is recommended to create a new virtual environment):
133
+ To install `RadGEEToolbox` version 1.6.3 using pip (NOTE: it is recommended to create a new virtual environment):
71
134
 
72
135
  ```bash
73
- pip install RadGEEToolbox==1.6.2
136
+ pip install RadGEEToolbox==1.6.3
74
137
  ```
75
138
 
76
139
  ### Installing via Conda
77
140
 
78
- To install `RadGEEToolbox` version 1.6.2 using conda-forge (NOTE: it is recommended to create a new virtual environment):
141
+ To install `RadGEEToolbox` version 1.6.3 using conda-forge (NOTE: it is recommended to create a new virtual environment):
79
142
 
80
143
  ```bash
81
144
  conda install conda-forge::radgeetoolbox
@@ -106,8 +169,32 @@ To verify that `RadGEEToolbox` was installed correctly:
106
169
  python -c "import RadGEEToolbox; print(RadGEEToolbox.__version__)"
107
170
  ```
108
171
 
109
- You should see `1.6.2` printed as the version number.
172
+ You should see `1.6.3` printed as the version number.
173
+
174
+ ### Want to Visualize Data? Install These Too
175
+
176
+ The core functionality of this package is focused on the processing of geospatial and remote sensing data using Google Earth Engine. It does **not** include interactive mapping functionality by default.
110
177
 
178
+ **If you wish to view GEE data on interactive maps (e.g., following along with the mapping portions of the [example notebooks](https://github.com/radwinskis/RadGEEToolbox/tree/main/Example%20Notebooks)), you will need to install the [optional `geemap` package](https://geemap.org) in the environment that `RadGEEToolbox` is installed:**
179
+
180
+ ```python
181
+ pip install geemap
182
+ ```
183
+ or
184
+
185
+ ```bash
186
+ conda install conda-forge::geemap
187
+ ```
188
+ **If you plan to use `geemap` in a Jupyter Notebook, you will also need to install `ipykernel`:**
189
+
190
+ ```python
191
+ pip install ipykernel
192
+ ```
193
+ or
194
+
195
+ ```bash
196
+ conda install anaconda::ipykernel
197
+ ```
111
198
  ________
112
199
  # Usage Example
113
200
 
@@ -122,7 +209,7 @@ from RadGEEToolbox import LandsatCollection
122
209
 
123
210
  # 2. Authenticate & Initialize GEE API
124
211
  ee.Authenticate()
125
- ee.Initialize()
212
+ ee.Initialize(project='my-cloud-project-ID) #replace with your Google Cloud project ID
126
213
 
127
214
  # 3. Define study area boundary - in this case Lake Powell, Utah
128
215
  study_area = ee.Geometry.Polygon(
@@ -145,6 +232,9 @@ collection = LandsatCollection(
145
232
  dates = collection.dates
146
233
  print(dates)
147
234
  ```
235
+ ```
236
+ ['2020-01-13', '2020-02-14', '2020-05-04', '2020-05-20', '2020-07-07', '2020-08-08', '2020-08-24', '2020-09-25', '2020-10-11', '2020-10-27', '2020-11-28', '2020-12-30', '2021-01-15', '2021-01-31', '2021-04-05', '2021-05-07', '2021-06-08', '2021-07-10', '2021-08-27', '2021-10-30', '2021-11-10', '2021-11-10', '2021-12-01', '2021-12-17', '2022-01-02', '2022-01-10', '2022-01-26', '2022-02-11', '2022-02-19', '2022-02-27', '2022-03-23', '2022-04-08', '2022-05-02', '2022-05-18', '2022-05-26', '2022-06-11', '2022-06-27', '2022-07-13', '2022-08-06', '2022-08-22', '2022-08-30', '2022-09-07', '2022-09-23', '2022-10-01', '2022-10-09', '2022-10-17', '2022-10-25', '2022-11-10', '2023-01-21', '2023-03-18', '2023-04-11', '2023-06-22', '2023-06-30', '2023-07-08', '2023-07-16', '2023-09-18', '2023-09-26', '2023-10-04', '2023-10-20', '2023-11-13', '2023-11-21', '2023-12-07', '2023-12-15', '2023-12-31', '2024-01-16', '2024-03-20', '2024-04-13', '2024-04-21', '2024-05-07', '2024-05-23', '2024-06-08', '2024-06-16', '2024-07-02', '2024-07-10', '2024-07-26', '2024-08-19', '2024-08-27', '2024-09-04', '2024-09-12', '2024-09-20', '2024-09-28', '2024-10-06', '2024-10-22', '2024-10-30', '2024-11-07', '2024-11-15', '2024-12-01']
237
+ ```
148
238
  ### 2. Apply a Cloud Mask and Compute NDWI
149
239
  ```python
150
240
  # 1. Mask clouds
@@ -156,15 +246,16 @@ water_classification_maps = cloud_masked_collection.ndwi_collection(
156
246
  threshold=0
157
247
  )
158
248
  ```
159
- ![Visualization of true color and classified water (in blue) from one of the dates in the collection](image-3.png)
160
249
 
161
- Visualization of true color and classified water (in blue) from one of the dates in the collection
250
+ ![Visualization of true color and classified water (in blue) from one of the dates in the collection](LakePowellNDWI.png)
251
+
252
+ ***Visualization of true color and classified water (in blue) from one of the dates in the collection. To see the code used to display this image, please view [this Example Notebook](https://github.com/radwinskis/RadGEEToolbox/blob/main/Example%20Notebooks/Complete_ReadMe_Example.ipynb)***
162
253
 
163
254
  ### 3. Calculate Water Area Time Series
164
255
  ```python
165
256
  calculate_water_area = cloud_masked_NDWI_collection.PixelAreaSumCollection(
166
257
  band_name='ndwi', #specify band to use from collection
167
- geometry=study_area), #ee.Geometry() of your study area
258
+ geometry=study_area, #ee.Geometry() of your study area
168
259
  threshold=0, #binary classification threshold for unclassified rasters,
169
260
  scale=90 #pixel size for zonal statistics
170
261
  )
@@ -172,9 +263,9 @@ water_area_time_series = calculate_water_area.aggregate_array('ndwi').getInfo()
172
263
  print('List of square meters of water in images:', water_area_time_series)
173
264
  ```
174
265
 
175
- ![Plotted Results from Above Example - All Processed in Less Than 5 Seconds!](image-4.png)
266
+ ![Plotted Results from Above Example - All Processed in Less Than 5 Seconds!](LakePowellPlot.png)
176
267
 
177
- Plotted Results from Above Example - All Processed in Less Than 5 Seconds!
268
+ ***To see the code used to display this plot, please view [this Example Notebook](https://github.com/radwinskis/RadGEEToolbox/blob/main/Example%20Notebooks/Complete_ReadMe_Example.ipynb)***
178
269
 
179
270
  For details about Sentinel-1 SAR and Sentinel-2 MSI modules, and all other available Landsat or cross-module functions, please refer to the [RadGEEToolbox documentation](https://radgeetoolbox.readthedocs.io/en/latest/). You can also explore [`/Example Notebooks`](https://github.com/radwinskis/RadGEEToolbox/tree/main/Example%20Notebooks) for more usage examples.
180
271
 
@@ -4,9 +4,9 @@ RadGEEToolbox/LandsatCollection.py,sha256=Tq-hwFPolqZI1rL-ORS5dPcjBa3QGEy2ruhc_T
4
4
  RadGEEToolbox/Sentinel1Collection.py,sha256=Z32YszIUC_eswMtravMGrNHCP0RA5LK_qyPHQT6stVk,62040
5
5
  RadGEEToolbox/Sentinel2Collection.py,sha256=6jx5sMKKDgkr6okQzDQogUBE6t_aBubViZ1OIuIt5K8,67494
6
6
  RadGEEToolbox/VisParams.py,sha256=knGnu0zdxkDC1jqvgybNUKUY5IrJaQGgd-7j4odcRQE,5197
7
- RadGEEToolbox/__init__.py,sha256=t0qJcUKAO0EIh0zLDPyjO7zQOjnrSLJUjZ4Q_k1w_Ig,304
8
- radgeetoolbox-1.6.2.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
9
- radgeetoolbox-1.6.2.dist-info/METADATA,sha256=33beAetm-2ONOHRR4u_EvWNtXAPOaMCpodol2DoBLzc,7713
10
- radgeetoolbox-1.6.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
11
- radgeetoolbox-1.6.2.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
12
- radgeetoolbox-1.6.2.dist-info/RECORD,,
7
+ RadGEEToolbox/__init__.py,sha256=2ZG1sQoQVj7g7xTLQE2sbu0uchpPeto8lsq7CGg7pTM,529
8
+ radgeetoolbox-1.6.3.dist-info/licenses/LICENSE.txt,sha256=5Xj9dwVkawz6d8zhCwJy0SmXvm0U4K_msJnOrkHLO1w,1089
9
+ radgeetoolbox-1.6.3.dist-info/METADATA,sha256=7XOL6h_su7U0ncn45se2dNh9M3q04mouNz1YcrUbxc4,13145
10
+ radgeetoolbox-1.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ radgeetoolbox-1.6.3.dist-info/top_level.txt,sha256=W2E520tugQoptDkhctKFbzsheL2l_DyYLKqKXkD9G_E,14
12
+ radgeetoolbox-1.6.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5