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

Unable to pass BLOCKYSIZE for creating striped geotiff files #2599

Closed
gogglesguy opened this issue Oct 3, 2022 · 2 comments
Closed

Unable to pass BLOCKYSIZE for creating striped geotiff files #2599

gogglesguy opened this issue Oct 3, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@gogglesguy
Copy link
Contributor

gogglesguy commented Oct 3, 2022

GDAL allows setting BLOCKYSIZE to control strip heights in striped geotiff files. rasterio has the mistaken impression this parameter only is relevant for TILED geotiffs and actively prohibits this flag from being passed on:

rasterio/rasterio/_io.pyx

Lines 349 to 360 in 5cf71dc

cdef char **convert_options(kwargs):
cdef char **options = NULL
tiled = kwargs.get("tiled", False) or kwargs.get("TILED", False)
if isinstance(tiled, str):
tiled = (tiled.lower() in ("true", "yes"))
for k, v in kwargs.items():
if k.lower() in ['affine']:
continue
elif k in ['BLOCKXSIZE', 'BLOCKYSIZE'] and not tiled:
continue

Relevant Geotiff Driver:
https://gdal.org/drivers/raster/gtiff.html

BLOCKYSIZE=n: Set tile or strip height. Tile height defaults to 256, strip height defaults to a value such that one strip is 8K or less.

@snowman2
Copy link
Member

snowman2 commented Oct 8, 2022

This looks to be driver specific. Probably would need to check if the driver is GeoTiff if this is added.
@sgillies @vincentsarago, do you see any issues moving forward with this for the GeoTiff driver only?

@snowman2 snowman2 added this to the post-1.3 milestone Oct 8, 2022
@snowman2 snowman2 added the bug label Oct 8, 2022
@snowman2 snowman2 modified the milestones: post-1.3, 1.3.3 Oct 8, 2022
@sgillies sgillies added this to the 1.3.3 milestone Oct 19, 2022
@sgillies sgillies self-assigned this Oct 19, 2022
@sgillies
Copy link
Member

I'm taking care of this today.

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

No branches or pull requests

3 participants