Map.addLayer ERROR #85
Unanswered
XingLong-Dai
asked this question in
Q&A
Replies: 2 comments 2 replies
-
That's because the second argument of ee.Geometry.Polygon is |
Beta Was this translation helpful? Give feedback.
1 reply
-
EE plugin is written in python, I guess there should be a way to trigger python code that uses EE code and then pass results back somehow, I'd search for similar examples in QGIS forums/samples. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
when run Map.addlayer(LandRemap), occur following error.Why?
Traceback (most recent call last):
File "C:\Users\Japycer\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\data.py", line 338, in _execute_cloud_call
return call.execute(num_retries=num_retries)
File "C:\Users\Japycer\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\Japycer\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\http.py", line 907, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/maps?fields=name&alt=json returned "Projection: Argument 'crs': Invalid type.
Expected type: String.
Actual type: Dictionary.
Actual value: {}">
Following is my code:
import ee
from ee_plugin import Map
roi = ee.Geometry.Polygon(
[[[101.17330962809865, 28.52538873146126],
[101.17330962809865, 19.34092009543521],
[117.56491119059865, 19.34092009543521],
[117.56491119059865, 28.52538873146126]]], {}, False)
dataset = ee.ImageCollection("COPERNICUS/Landcover/100m/Proba-V-C3/Global")
.filterDate('2019-01-01','2019-12-31')
.filterBounds(roi)
Land_Cover = dataset.mosaic().clip(roi).select('discrete_classification')
Land_Remap = Land_Cover.remap([0,20,30,40,50,60,70,80,90,100,111,112,113,114,115,121,122,123,124,125,126,200],
[4, 2, 2, 1, 3, 2, 2, 5, 5, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5],
5,'discrete_classification')
Map.addLayer(Land_Remap)
Map.centerObject(roi)
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions