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

Small fixes in set hazard methods #425

Merged
merged 4 commits into from
Mar 12, 2025
Merged

Small fixes in set hazard methods #425

merged 4 commits into from
Mar 12, 2025

Conversation

panosatha
Copy link
Collaborator

@panosatha panosatha commented Dec 6, 2024

These changes ensure that when a rotated grid is provided it is automatically translated to a standard grid that FIAT can handle.

Copy link

sonarqubecloud bot commented Dec 6, 2024

@panosatha panosatha marked this pull request as ready for review March 7, 2025 10:59
@panosatha panosatha requested a review from Santonia27 March 7, 2025 10:59
if "xc" in da.coords:
self.logger.warning("Hazard map is rotated. It will be reprojected to a none rotated grid using nearest neighbor interpolation")
da = da.raster.reproject(dst_crs=da.rio.crs)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not fully familiar how the grid rotation works best, but according to chatgpt this code may fail if the crs is not in standard projection like UTM or WGS84. Maybe you could comment on that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It uses epsg codes from what I saw. So if there is an epsg code related to you projection it should work.

@panosatha panosatha merged commit 04bbbd3 into main Mar 12, 2025
7 of 8 checks passed
@panosatha panosatha deleted the hazard_fixes branch March 12, 2025 14:00
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