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

Should we tests wheels with raster formats? #104

Open
vincentsarago opened this issue Feb 21, 2023 · 6 comments
Open

Should we tests wheels with raster formats? #104

vincentsarago opened this issue Feb 21, 2023 · 6 comments

Comments

@vincentsarago
Copy link
Member

Should we add a tests step when we create wheels to make sure we do not release wheels that drop supports for some raster format or compression scheme (e.g #94)

I know it might be difficult to test all format but I'm sure we can at least test for those we added specific step for (e.g https://github.com/rasterio/rasterio-wheels/blob/main/config.sh#L258-L270)

example: https://github.com/lambgeo/docker-lambda/blob/master/tests/tests.sh

@AndrewAnnex
Copy link
Contributor

one potential idea would be to just convert things on-the-fly within the github action using rasterio methods

@sgillies
Copy link
Member

@AndrewAnnex yeah, that's the difficult issue at the heart of this, isn't it? Listing available formats doesn't say whether optional variants of those formats (LERC, JXL, etc) have been built. I wonder if GDAL driver metadata does or could could help us? @rouault can the GTiff driver tell us what its compression options are?

@rouault
Copy link

rouault commented Feb 27, 2023

yes, you can call GDALGetMetadataItem(GDALGetDriverByName("GTiff"), GDAL_DMD_CREATIONOPTIONLIST, NULL).
This will return the XML snippet that you can see with "gdalinfo --format GTiff". If you know which formats to look for, you can just find for the string, or parse the XML if you want to get the list

@AndrewAnnex
Copy link
Contributor

would be neat to make a new dict expanding on rasterio.drivers.raster_driver_extensions to include the results from that metadata call

@rbuffat
Copy link

rbuffat commented Feb 27, 2023

Fiona has some limited capabilities to access driver options (using GDALGetMetadataItem): https://github.com/Toblerity/Fiona/blob/master/fiona/meta.py#L135-L171
https://github.com/Toblerity/Fiona/blob/master/fiona/ogrext.pyx#L2143-L2179

Not sure if it is still the case, but if I remember correctly the Metadata was defined by the drivers manually, thus it depends on the driver how accurate the information is.

Fiona has also some round-trip tests, that test if data can be written using a driver and then read back again. But due to the slight difference between Fionas data model and GDALs data model these tests are quite messy.

@sgillies
Copy link
Member

My preference would be to not add any round-tripping tests with actual data to rasterio-wheels, but to extend rio-env with an option (--format-details maybe?) that would produce structured information comparable to gdalinfo --format. Confirming that, e.g., GTiff/LERC is available would be a big improvement.

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

5 participants