spatialthoughts / courses

Code and HTML page repository for courses.spatialthoughts.com
56 stars 19 forks source link

End-to-End Google Earth Engine (Full Course Material) #117

Closed utterances-bot closed 11 months ago

utterances-bot commented 11 months ago

End-to-End Google Earth Engine (Full Course Material)

https://courses.spatialthoughts.com/end-to-end-gee.html

rekhabu commented 11 months ago

Different image collections yield a significantly different number of images for the same time period over a ROI. How do we decide which is the most appropriate collection for a given application, for example monitoring crop health via vegetation indices. Is there a guideline that can help in this.

spatialthoughts commented 11 months ago

You choose the image collection that is best suited for the purpose.

First, determine which sensor you need

For example, Sentinel-2 provides higher resolution but has limited historic coverage. Landsat has thermal bands that can help certain crop analysis and has a 50 year archive but has a lower spatial resolution. Temporal resolution of Sentinel-2 is much better than Landsat, so it allows you to monitor more frequently.

Once you know the sensor you want to use, the preference is always to work with Surface Reflectance (Level 2) data whenever possible. But again this is not always a choice. For example, Sentinel-2 has Level 1 data from 2015 onwards but Level 2 data from 2017 onwards.

So as of now, my recommendation for crop health via vegetation indices is to use Sentinel-2 Level 2 data if you can deal with a limited historical archive.

Another dataset to keep in mind for future is HLS - which is a fusion of both Landsat and Sentinel-2 which maybe a good choice for vegetation monitoring. But it's still not fully available and may take a while for examples to be developed and tested.

Hope this helps.

rekhabu commented 11 months ago

Yes, this was helpful. Thank you for the explanation.

halieute commented 3 months ago

Good afternoon i need your help here , I tried to follow the instructions for assigning the google earth engine in Qgis and i got this errors "import ee Traceback (most recent call last): File "C:\OSGeo4W\apps\Python312\Lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin__init.py", line 38, in wrapping_ee_import module = builtin_import(name, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\site-packages\ee__init.py", line 15, in from ee import _utils File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin__init.py", line 40, in wrapping_ee_import__ if not module.data._credentials: ^^^^^^^^^^^^^ AttributeError: partially initialized module 'ee' has no attribute 'data' (most likely due to a circular import) exec(Path('C:/Users/DELL/AppData/Local/Temp/tmpq9rfmlyz').read_text()) Traceback (most recent call last): File "C:\OSGeo4W\apps\Python312\Lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in File "", line 1, in File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\init.py", line 38, in wrapping_ee_import module = builtin_import(name, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\OSGeo4W\apps\Python312\Lib\site-packages\ee__init.py", line 15, in from ee import _utils File "C:\Users/DELL/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\init.py", line 40, in wrapping_ee_import__ if not module.data._credentials: ^^^^^^^^^^^^^ AttributeError: partially initialized module 'ee' has no attribute 'data' (most likely due to a circular import)"

spatialthoughts commented 3 months ago

@halieute Install the EE Python API on your system using conda. Follow the steps at https://courses.spatialthoughts.com/install-gee-python-api.html

Create a new environment and once installed, authenticate using earthengine authenticate. Re-install the plugin and it should work. If you still get the error, create a new QGIS Profile and install the plugin there. Watch this video on how to create a new profile.

venkatsunder commented 3 weeks ago

var urban = ee.FeatureCollection('users/ujavalgandhi/e2e/urban_gcps');

Thank you for sharing valuable content on GEE. Using markers, we can mark certain locations. However, I don't have an option to save them to a physical location. But I could see you have used them from repository as shown in the above line. Can you please share the process to save them to certain locations as GCPs and refer them as you referred in the above code?

spatialthoughts commented 3 weeks ago

@venkatsunder I just exported merged GCPs as an asset using Export.table.toAsset()

venkatsunder commented 3 weeks ago

@venkatsunder I just exported merged GCPs as an asset using Export.table.toAsset()

thank you for the quick response.