You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
to_geotiff accepts tile_size values that are not multiples of 16 #1767
to_geotiff accepts tile_size values that violate the TIFF 6 spec.
The spec requires TileWidth and TileLength to be multiples of 16. The current validation in xrspatial/geotiff/__init__.py only checks that tile_size is a positive int, so tile_size=17 slips through and writes a file that the in-repo reader round-trips fine but that strict TIFF readers (GDAL, libtiff strict mode) may reject.
Fix: when tiled=True, require tile_size to be a positive multiple of 16. Raise ValueError naming the bad value and suggesting the nearest valid choices ((tile_size // 16) * 16 and ((tile_size // 16) + 1) * 16). Update the docstring.
Activity
geotiff: require tile_size to be a multiple of 16 (#1767) (#1781)
geotiff: extract input validators to _validation.py (#1882) (#1892)