tiler icon indicating copy to clipboard operation
tiler copied to clipboard

python-gdal not available on Ubuntu 20.04 (Focal)

Open achubaty opened this issue 3 years ago • 1 comments

It looks like python-gdal is not available for Ubuntu 20.04 (though python3-gdal is), so no tiles are created.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal
$ sudo apt install python-gdal
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-gdal is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However, the following packages replace it:
  gdal-bin

E: Package 'python-gdal' has no installation candidate
$ apt search gdal-bin
Sorting... Done
Full Text Search... Done
gdal-bin/focal,now 3.0.4+dfsg-1build3 amd64 [installed]
  Geospatial Data Abstraction Library - Utility programs

And in R:

> x <- system.file("maps/map_wgs84.tif", package = "tiler")
> tiles <- file.path(tempdir(), "tiles")
> tile(x, tiles, 0)
Reprojecting raster...
Coloring raster...
Preparing for tiling...
[1] "/tmp/RtmpPJEjuj"
Creating tiles. Please wait...
Traceback (most recent call last):
  File "/home/achubaty/Documents/GitHub/tiler/inst/python/gdal2tiles.py", line 52, in <module>
    from osgeo import gdal
ImportError: No module named osgeo
Creating tile viewer...
Complete.
Warning message:
In raster::projectRaster(r, e, method = method) :
  input and ouput crs are the same
> dir(tiles)
character(0)

achubaty avatar Jul 09 '20 14:07 achubaty

sudo apt-get install python3-gdal

Worked in my case

hvitis avatar Sep 07 '21 21:09 hvitis