Document the weird /vsigzip/ convention when reading gzip files in docstring, examples and tutorial. So basically this piece of infromation:
mesa-geo's from_file() immediately calls rasterio.open() without modifying the argument, you should do this:
raster_layer = mg.RasterLayer.from_file(
f"/vsigzip/{elevation_file}", cell_cls=LakeCell, attr_name="elevation"
)
Rasterio (from GDAL) has gzip support built-in: https://gdal.org/user/virtual_file_systems.html#vsigzip-gzipped-file.
Here comes the plot twist: /vsigzip/ is not part of the data path, but a weird convention by GDAL:
/vsigzip/my.gz # (relative path to the .gz)
/vsigzip//home/even/my.gz # (absolute path to the .gz)
/vsigzip/c:\users\even\my.gz
This should be thoroughly documented in Mesa-geo, since this is a very specific piece of knowledge you won't otherwise find out and it's publicly exposed in our user example models.
Related tickets:
Todo
Document the weird
/vsigzip/convention when reading gzip files in docstring, examples and tutorial. So basically this piece of infromation:Here comes the plot twist:
/vsigzip/is not part of the data path, but a weird convention by GDAL:This should be thoroughly documented in Mesa-geo, since this is a very specific piece of knowledge you won't otherwise find out and it's publicly exposed in our user example models.
Related tickets:
rasterio.errors.RasterioIOErrorwhile reading gzip file rasterio/rasterio#2863Todo