Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixing backward-compatibility (make sure it does not crash) #93

Merged
merged 2 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ A: Go to http://code.earthengine.google.com and make sure you can access code ed
- [x] Fixed the authentication dialog when the url shortener doesn't work by any reason [#66](https://github.com/gee-community/qgis-earthengine-plugin/issues/66)
- [x] Fix loading extra python dependencies to the plugin, fix [#62](https://github.com/gee-community/qgis-earthengine-plugin/issues/62)

#### Alpha 0.0.4 (Q1 2021) :heavy_check_mark:
- [x] Minor bugfix release (EE authentication)

#### 1.0.0 (Q2 2021) :hourglass:
- [ ] EE vector layer inspector
- [ ] EE raster collection layer inspector
Expand Down
10 changes: 9 additions & 1 deletion ee_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,16 @@ def updateLayers(self):
ee_object = l.customProperty('ee-object')
ee_object_vis = l.customProperty('ee-object-vis')

# check for backward-compatibility, older file formats (before 0.0.3) store ee-objects in ee-script property an no ee-object-vis is stored
# also, it seems that JSON representation of persistent object has been changed, making it difficult to read older EE JSON
if ee_object is None:
print('\nWARNING:\n Map layer saved with older version of EE plugin is detected, backward-compatibility for versions before 0.0.3 is not supported due to changes in EE library, please re-create EE layer by re-running the Python script\n')
return

ee_object = ee.deserializer.fromJSON(ee_object)
ee_object_vis = json.loads(ee_object_vis)

if ee_object_vis is not None:
ee_object_vis = json.loads(ee_object_vis)

# update loaded EE layer

Expand Down
2 changes: 1 addition & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name=Google Earth Engine
qgisMinimumVersion=3.8
description=Integrates QGIS with Google Earth Engine
version=0.0.3
version=0.0.4
author=Gennadii Donchyts
[email protected]

Expand Down