rasterio / rasterio-wheels

MIT License
11 stars 16 forks source link

Cannot read ZSTD compressed rasters with latest release on Windows #91

Closed maxee closed 2 years ago

maxee commented 2 years ago

Expected behavior and actual behavior.

This is exactly the same issue as rasterio/rasterio#2542 with the difference that it applies to the v1.3.2 Windows wheel builds.

ZSTD compressed rasters cannot be decoded with v1.3.2 wheel builds on Windows:

WARNING:rasterio._env:CPLE_AppDefined in xxx.tif:ZSTD compression support is not configured
INFO:rasterio._env:GDAL signalled an error: err_no=1, msg='xxx.tif: Cannot open TIFF file due to missing codec.'
DEBUG:rasterio.env:Exiting env context: <rasterio.env.Env object at 0x000002160816ACA0>
DEBUG:rasterio.env:Cleared existing <rasterio._env.GDALEnv object at 0x000002160816AF10> options
DEBUG:rasterio._env:Stopped GDALEnv <rasterio._env.GDALEnv object at 0x000002160816AF10>.
DEBUG:rasterio.env:Exiting outermost env
DEBUG:rasterio.env:Exited env context: <rasterio.env.Env object at 0x000002160816ACA0>
ERROR:root:Error while creating tiles: xxx.tif: Cannot open TIFF file due to missing codec.
Traceback (most recent call last):

Steps to reproduce the problem.

Try to decode a ZSTD compressed tif raster file on Windows having the v1.3.2 wheel installed.

Environment Information

rasterio info:
  rasterio: 1.3.2
      GDAL: 3.5.1
      PROJ: 9.0.1
      GEOS: 3.11.0
 PROJ DATA: C:\OSGeo4W64\share\proj
 GDAL DATA: C:\OSGeo4W64\bin

System:
    python: 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
executable: python.exe
   machine: Windows-10-10.0.22621-SP0

Python deps:
    affine: 2.3.0
     attrs: 21.4.0
   certifi: 2021.10.08
     click: 8.0.3
     cligj: 0.7.2
    cython: None
     numpy: 1.22.2
    snuggs: 1.4.7
click-plugins: None
setuptools: 57.0.0

Installation Method

pip install rasterio==1.3.2 on Windows x64.

snowman2 commented 2 years ago

Wheels are build using vcpkg. Here is an example GDAL PR: https://github.com/microsoft/vcpkg/pull/26676

To have ZSTD added, it will need to be added upstream.

maxee commented 2 years ago

Thanks for the information. I opened an issue in their repository. However, although I cannot verify it anymore, I think that ZSTD GeoTiff files worked with the 1.2.x versions. Unfortunately the wheels for 1.2.x seem not be available anymore so I would have to build it manually...

snowman2 commented 2 years ago

Older windows wheels are available here: https://www.lfd.uci.edu/~gohlke/pythonlibs/

dg0yt commented 2 years ago

To have ZSTD added, you will need vcpkg port tiff[zstd] in addition to gdal in vcpkg.json.

sgillies commented 2 years ago

@dg0yt thanks for the tip!