gee-community / qgis-earthengine-plugin

Integrates Google Earth Engine and QGIS using Python API
http://qgis-ee-plugin.appspot.com
MIT License
448 stars 115 forks source link

Add high resolution images support #132

Closed oyupanqui closed 8 months ago

oyupanqui commented 11 months ago

Hello! Thanks for the amazing plugn.

I've been using drone imagery with Google Earth Engine for some time, and for digitization purposes I wanted to use QGIS (the version I'm using is 3.22.16).

The main problem is that the QGIS Map doesn't show the GEE tile at native resolution:

image

I think it's because of the max zoom level (by default in QGIS it's 18 i believe). So, one way I was able to show the image with the native resolution was copying and pasting the source provider of the resulting layer by running Map.addLayer, then adding it manually as an XYZ Connection, specifying higher max zoom level.

image

By doing this, the Map shows the native spatial resolution

image

Is there any way of setting up the default the max zoom level in the same plugin, to avoid doing this process manually each time?

Thank you very much!

XavierCLL commented 11 months ago

Hi @oyupanqui

Thanks for opening and describing that issue, maybe it is a Qgis side problem that required an adjustment by the plugin, but I'm not completely sure what exactly is the issue, that needs research. Could you share the code and the URL for both images for testing purposes?

Xavier

oyupanqui commented 10 months ago

Hi @XavierCLL sorry for the delayed response. I'm sharing a simple code for the visualization of a small drone image:

import ee from ee_plugin import Map img = ee.Image('users/osmaryupanqui/drone_sample') Map.addLayer(img)

This returns the following image: image

But with a closer inspection to the image you can see that QGIS doesn't display the layer with the native resolution image

The source of the data (the drone image) has the following link:

https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/maps/286b11e519ebc0cdfc0d1046ade247c4-92a0ba827f88aa9e12b5a602b1113097/tiles/{z}/{x}/{y}

And if you add the link as an XYZ Connection in QGIS and increase the Max. Zoom Level (to 20), like the following screenshot image

Now the image is displayed at full resolution image

I personally think that it's a QGIS side problem as you mentioned, there is probably a zoom level parameter that needs to be tweaked to allow the display of very high resolution images.

Thanks!

Osmar

gena commented 8 months ago

I've tried to fix this by tweaking WMS data provider parameters explicitly. I'm not sure if QGIS queries these properly, need to investigate. You can try changing it locally before the official bugfix release in your ee_plugin sources: https://github.com/gee-community/qgis-earthengine-plugin/commit/8cc6cd633d798d84562abd9acce6bc120d578d0d or reinstall manually from a zip file: https://github.com/gee-community/qgis-earthengine-plugin/actions/runs/7775036710