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

ValueError: yscale 0.11356327132282978 cannot be less than 1.0 #44

Open
paulovieira opened this issue Oct 19, 2022 · 1 comment
Open

Comments

@paulovieira
Copy link

paulovieira commented Oct 19, 2022

Installed gdal2mbtiles in a virtual environment. Tried to use it with this raster from https://www.naturalearthdata.com:

https://www.naturalearthdata.com/downloads/10m-gray-earth/gray-earth-with-shaded-relief-and-water/

Direct link for the raster: https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/raster/GRAY_LR_SR_W.zip

Got this error:

ValueError: yscale 0.11356327132282978 cannot be less than 1.0

Full output:

(my_env) $ gdal2mbtiles --coloring=gradient --color "0:#fff" GRAY_LR_SR_W.tif GRAY_LR_SR_W.mbtiles
Traceback (most recent call last):
  File "/home/pvieira/my_env/bin/gdal2mbtiles", line 8, in <module>
    sys.exit(main())
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/main.py", line 297, in main
    warp_mbtiles(inputfile=inputfile.name, outputfile=outputfile.name,
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/helpers.py", line 203, in warp_mbtiles
    return image_mbtiles(inputfile=warped, outputfile=outputfile,
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/helpers.py", line 73, in image_mbtiles
    pyramid = preprocessor(**locals())
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/helpers.py", line 322, in resample_after_warp
    pyramid.dataset.resample_to_world()
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/vips.py", line 601, in resample_to_world
    result = self._resample(ratios=ratios)
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/vips.py", line 570, in _resample
    self._image = VImageAdapter(self.image).stretch(
  File "/home/pvieira/my_env/lib/python3.10/site-packages/gdal2mbtiles/vips.py", line 377, in stretch
    raise ValueError(
ValueError: yscale 0.11356327132282978 cannot be less than 1.0

I'm using gdal 3.4.1.

@swen100
Copy link

swen100 commented Oct 26, 2022

Got the same error, but with own raster-data.

Output:

Traceback (most recent call last):
  File "/usr/local/bin/gdal2mbtiles", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/main.py", line 297, in main
    warp_mbtiles(inputfile=inputfile.name, outputfile=outputfile.name,
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/helpers.py", line 203, in warp_mbtiles
    return image_mbtiles(inputfile=warped, outputfile=outputfile,
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/helpers.py", line 73, in image_mbtiles
    pyramid = preprocessor(**locals())
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/helpers.py", line 322, in resample_after_warp
    pyramid.dataset.resample_to_world()
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/vips.py", line 601, in resample_to_world
    result = self._resample(ratios=ratios)
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/vips.py", line 570, in _resample
    self._image = VImageAdapter(self.image).stretch(
  File "/usr/local/lib/python3.9/dist-packages/gdal2mbtiles/vips.py", line 377, in stretch
    raise ValueError(
ValueError: yscale 0.3478704038449042 cannot be less than 1.0

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

2 participants