Skip to content

Conversation

@maxrjones
Copy link
Member

@maxrjones maxrjones commented Nov 6, 2025

This PR fixes the failure related to virtual-zarr/virtual-tiff#52.

I added instructions for downloading the file rather than subsetting and committing the file because gdal drops the problematic tag.

This looks to be a tag that was proposed as an addition to the GeoTIFF standard but never actually added to the spec - https://github.com/OSGeo/gdal/blob/657c5e4a4fb5b1389fd800ea9cc964435ad89a18/frmts/gtiff/libgeotiff/geokeys.inc#L34.

xref https://trac.osgeo.org/geotiff/wiki/TOWGS84GeoKey

@maxrjones maxrjones changed the title Add failing test for unknown tag Add support for GeogTOWGS84GeoKey Nov 7, 2025
@maxrjones maxrjones requested a review from kylebarron November 7, 2025 00:29
src/cog.rs Outdated
#[tokio::test]
async fn tmp_towgs84() {
let folder = "/Users/kyle/github/developmentseed/async-tiff";
let path = object_store::path::Path::parse("USGS_13_s14w171.tif").unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be able to create like a one-pixel version of this file to check into the tests?

Maybe try

gdal_translate input.tif output_1px.tif -srcwin 0 0 1 1

to copy just the upper-left-most pixel of the file.

You'd want to manually check that the desired header still exists.

Copy link
Member Author

@maxrjones maxrjones Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not, I'd need to specifically compile GDAL to read and write that part of the header. The wheels on PyPI will drop the TAG during GDAL translate.

I can do that if you think it's necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test file in e4cecf5 (#131)

@maxrjones maxrjones self-assigned this Nov 10, 2025
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

Successfully merging this pull request may close these issues.

2 participants