gee-community/geemap

geemap.download_ee_image_tiles() fails with: AttributeError: module 'geedim' has no attribute 'download'

jimoreira opened this issue · 8 comments

trying to use the great options provided by this package.

i did
`features = geemap.fishnet(country, rows=10, cols=10, delta=0)

out_dir = os.path.expanduser('D:\xx\salidas\diferencia_tiff')

geemap.download_ee_image_tiles(
dif_pro, features, out_dir, prefix="feb23_feb22_", crs="EPSG:3857", scale=10
)`

and get

`Downloading 1/80: D:\xx\salidas\diferencia_tiff\feb23_feb22_01.tif

AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_1660\501805173.py in ?()
9 # geemap.ee_export_image_to_drive(
10 # dif_pro, description='feb23_feb22', folder='mdp/proyecto6_seca', region=features, scale=10
11 # )
12
---> 13 geemap.download_ee_image_tiles(
14 dif_pro, features, out_dir, prefix="feb23_feb22_", crs="EPSG:3857", scale=10
15 )

~.conda\envs\gee\lib\site-packages\geemap\common.py in ?(image, features, out_dir, prefix, crs, crs_transform, scale, resampling, dtype, overwrite, num_threads, max_tile_size, max_tile_dim, shape, scale_offset, unmask_value, **kwargs)
12622 filename = os.path.join(
12623 out_dir, "{}{}.tif".format(prefix, str(i + 1).zfill(len(str(count))))
12624 )
12625 print(f"Downloading {i + 1}/{count}: {filename}")

12626 download_ee_image(
12627 image,
12628 filename,
12629 region,

~.conda\envs\gee\lib\site-packages\geemap\common.py in ?(image, filename, region, crs, crs_transform, scale, resampling, dtype, overwrite, num_threads, max_tile_size, max_tile_dim, shape, scale_offset, unmask_value, **kwargs)
12542
12543 if scale_offset:
12544 kwargs["scale_offset"] = scale_offset
12545

12546 img = gd.download.BaseImage(image)
12547 img.download(filename, overwrite=overwrite, num_threads=num_threads, **kwargs)

AttributeError: module 'geedim' has no attribute 'download'`

i can't find if i'm missing some other dependency or the 'gd.download()' is miss using since gd might be used for other package.
if you can help me here...

thanks a lot
and congratulations for your work, really awsomw!

giswqs commented
pip install -U geedim

thanks for your reply,
it's installed and imported on the script.
Previously i had the error showing the dependency, now, i have the one mentioned.

giswqs commented

You can try out the geedim example directly. If it does not work, it is your geedim installation problem.
https://github.com/leftfield-geospatial/geedim#example

yep...it doesn't
so, you are wright
i have created a conda env to install all these..but still..
i have geemap, rasterio, geedim listed..
running on windows 10
it works on my console..but not on my jupyter notebook

giswqs commented

What is your geedim version? The latest version is v1.7.0. Run pip install -U geedim to update it if needed. Conda might not install the latest version.

great.
I have 0.4.0 installed with conda-forge channel.
Now i have 1.7.0 installed with pip.
but now doesn't work either from cmd nor from jupyter notebook. I guess the pip install isn't resolving something.
The package is listed as installed

giswqs commented

This is a geedim installation issue rather than a geemap issue. If it does not work on your local computer, try Google Colab.

ok, thanks a lot, i will resolve it, but is clear where the issue is.

thanks again