Update elevation script to use cell_id structure#205
Open
Conversation
Collaborator
|
I very strongly recommend not doing this. This is a VE model coding problem. I completely understand that the result is annoying to deal with and you get the flipped outputs, but let us fix the problem in the model. That fix isn't going to happen immediately, but changing the inputs makes them harder to visualise and it is much harder to debug potential issues with cell_id coding. Stick with XY and let us make it work from the model end. |
Collaborator
|
Could we maybe put this as an issue in the VE repo? Something to tackle later (if it isn't already in there) |
Collaborator
It's there: ImperialCollegeLondon/virtual_ecosystem#1054 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update modifies the Maliau elevation preprocessing script so that the
output dataset follows the Virtual Ecosystem (VE) spatial data structure and
addresses the issue reported in “Input data is flipped when mapped on grid
#1054” #1054
Key changes include:
Replacing the 2D spatial dimensions (x, y) with a single cell_id
dimension consistent with VE grid structure.
Flattening the elevation grid using row-major ordering with a top-left
origin (cell_id = 0 at the top-left cell).
Explicitly controlling the orientation of the y-axis to prevent the grid
from being flipped when mapped to VE cells.
Storing per-cell spatial coordinates (x, y, and UTM coordinates) so
that each cell_id can be correctly mapped back to its spatial position.
These changes ensure that the elevation dataset aligns with the VE grid
layout and prevent the input data from being vertically flipped when mapped
onto the simulation grid.