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

Allow negative values for grid spacing #110

Open
mdpiper opened this issue Aug 8, 2022 · 1 comment
Open

Allow negative values for grid spacing #110

mdpiper opened this issue Aug 8, 2022 · 1 comment

Comments

@mdpiper
Copy link
Member

mdpiper commented Aug 8, 2022

This is a request to allow grid spacing to have negative values.

The current documentation for the get_grid_spacing function suggests that grid spacing is a distance between nodes of a grid, so a positive value.

However, it may be helpful to allow a negative value for a grid spacing. For example, geospatial imagery typically defines the top left corner as the origin. A negative y value for the grid spacing would indicate the grid is built from this origin in the negative y direction.

@hrajagers
Copy link
Collaborator

This issue only makes sense if the get_grid_origin call may return something else than the lower-left corner of the model grid which is currently specified in the description of the fuction. Once you go down that path, you're basically encoding the meaning of the origin in the sign information returned by the get_grid_spacing.

Another issue that you may subsequently run into is whether the first (fastest) dimension is the x-direction or the y-direction. In one of our input file formats we allow data providers to specify whether the reference corner is lower-left, lower-right, upper-left, or upper-right and subsequently whether the data order is column-first or row-first giving 8 combined options. Of course, BMI allows for data/grid in more than 2 dimensions adding to the number of options and the complexity.

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

2 participants