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

gis: Use gzip.open opener in RasterLayer.from_file #184

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Sep 1, 2024

Use pass the new rio_opener argument with gzip.open in RasterLayer.from_file(). This prevents having to do the weird /vsigzip/ stuff.

Note that urban_growth uses the rasterio opener directly, while the other two examples pass it via the mesa_geo.raster_layers.RasterLayer.open_file() method.

Use pass the new rio_opener argument with gzip.open in RasterLayer.from_file(). This prevents having to do the weird /vsigzip/ stuff.

Note that urban_growth uses the rasterio opener directly, while the other two examples pass it via the mesa_geo.raster_layers.RasterLayer.open_file() method.
@EwoutH EwoutH marked this pull request as ready for review September 1, 2024 12:18
@EwoutH
Copy link
Member Author

EwoutH commented Sep 1, 2024

Just checked the CI, on the main branch this works perfectly!

@EwoutH
Copy link
Member Author

EwoutH commented Sep 2, 2024

Merging for now. We can further fine tune this later.

@EwoutH EwoutH merged commit dee6363 into projectmesa:main Sep 2, 2024
1 of 3 checks passed
EwoutH added a commit to EwoutH/mesa-examples that referenced this pull request Sep 3, 2024
Use pass the new rio_opener argument with gzip.open in RasterLayer.from_file(). This prevents having to do the weird /vsigzip/ stuff.

Note that urban_growth uses the rasterio opener directly, while the other two examples pass it via the mesa_geo.raster_layers.RasterLayer.open_file() method.
EwoutH added a commit to EwoutH/mesa-examples that referenced this pull request Sep 20, 2024
Use pass the new rio_opener argument with gzip.open in RasterLayer.from_file(). This prevents having to do the weird /vsigzip/ stuff.

Note that urban_growth uses the rasterio opener directly, while the other two examples pass it via the mesa_geo.raster_layers.RasterLayer.open_file() method.
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.

1 participant