Scale issue
giswqs opened this issue · comments
Qiusheng Wu commented
The follow code will throw an error: EEException: Can't convert a computed geometry to GeoJSON. Use getInfo() instead.
However, if the scale
is changed to a value larger than 30 (e.g., 60), it works fine.
import geedim as gd
image = ee.Image('LANDSAT/LC09/C02/T1_L2/LC09_023031_20220617')
region = image.geometry()
image = image.multiply(0.0000275).add(-0.2).set(image.toDictionary())
img = gd.download.BaseImage(image)
img.download('landsat.tif', region=region, scale=30)
Dugal Harris commented
Resolved with v1.5.1
BTW geedim
supports automatic STAC scale and offset with the scale_offset
parameter. So you could replace your snippet with:
from geedim.download import BaseImage
gd_image = BaseImage(ee.Image('LANDSAT/LC09/C02/T1_L2/LC09_023031_20220617'))
gd_image.download('landsat.tif', scale_offset=True)