Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throws error: pyvips.error.Error: unable to call embed linear: vector must have 1 or 3 elements #26

Open
caleb87 opened this issue Mar 28, 2019 · 7 comments

Comments

@caleb87
Copy link

caleb87 commented Mar 28, 2019

Script runs for awhile, then throws the following error.

Running Ubuntu 18.04, gdalinfo is 2.2.3. Any ideas?

ubuntu@:~$ sudo gdal2mbtiles --min-resolution 1 --max-resolution 15 test.tif test.mbtiles
Traceback (most recent call last):
  File "/usr/local/bin/gdal2mbtiles", line 11, in <module>
    load_entry_point('gdal2mbtiles==2.1.1', 'console_scripts', 'gdal2mbtiles')()
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/main.py", line 309, in main
    colors=colors, band=band)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 211, in warp_mbtiles
    pngdata=pngdata)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 75, in image_mbtiles
    pyramid.slice(fill_borders=fill_borders)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/vips.py", line 1081, in slice
    fill_borders=fill_borders)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/vips.py", line 990, in slice_downsample
    levels=(self.resolution - max_resolution),
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/vips.py", line 835, in downsample
    offset=offset)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/gdal2mbtiles/vips.py", line 428, in tms_align
    x, y, width, height, background=[0, 0, 0, 0]  # Transparent
  File "/home/ubuntu/.local/lib/python2.7/site-packages/pyvips/vimage.py", line 804, in call_function
    return pyvips.Operation.call(name, self, *args, **kwargs)
  File "/home/ubuntu/.local/lib/python2.7/site-packages/pyvips/voperation.py", line 189, in call
    raise Error('unable to call {0}'.format(operation_name))
pyvips.error.Error: unable to call embed linear: vector must have 1 or 3 elements
@jordiecometrica
Copy link

Can you provide the test tif that generated this error?

@caleb87
Copy link
Author

caleb87 commented Mar 28, 2019

The files are available here:

http://54.161.226.75/original.tif
http://54.161.226.75/epsg3857.tif

original.tif (about 15MB) is the image I started with, and epsg3857 which has been converted to EPSG 3857 (about 150MB). Both are throwing the error.

@jordiecometrica
Copy link

jordiecometrica commented Mar 28, 2019

Alright, let's save the file here: original.tif.txt

Okay, figured it out. Had to change the filename extension so that github would allow it, but it's still very much a tif, not a txt. Just drop the extraneous filename extension the day someone downloads it and wants to try addressing this problem.

@ten2net
Copy link

ten2net commented Nov 2, 2020

I also have this problem.
gdal2mbtiles haifenxian1024.tif haifenxian1024.mbtiles --no-fill-borders --min-resolution 10 --max-resolution 19
This problem occurs when --no-fill-borders and --min-resolution is used.
but it was when no --no-fill-borders ,it was very slowly(It seems that it was the whole earth)

@karfam
Copy link

karfam commented May 28, 2022

Same problem here with a 30000 pixel tif.
At first I thought it was a problem of gdal 3 that get installed with the instructions, but the problem continues even with installing gdal 2.4.4

@csustjl
Copy link

csustjl commented Mar 6, 2023

Now I have this problem too, did you solve this problem before? gdal=2.2.2 pyvips=2.1.8 GDal2mbtiles = 2.1.0

@richwrd
Copy link

richwrd commented Mar 9, 2023

I have the same problem, has anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants