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

Feature/chainage indexing #86

Merged
merged 12 commits into from
Sep 19, 2024
Merged

Feature/chainage indexing #86

merged 12 commits into from
Sep 19, 2024

Conversation

ryan-kipawa
Copy link
Collaborator

This PR lets you index chainages of reaches with autocompletion as follows:

res = Res1D("my_results.res1d")
res.reaches['river']['5000.000']
# ...returns a ResultGridPoint

It also adds a way to actually test autocompletions with ipykernel.

It introduces one breaking change. Currently ResultReach can be iterated over and indexed numerically into the IRes1DReach objects. This is still possible to do, but now needs to be done on the ResultReach.reaches member.

@ryan-kipawa ryan-kipawa marked this pull request as ready for review September 12, 2024 07:45
@ryan-kipawa
Copy link
Collaborator Author

Added one last change so that gridpoints can also be indexed by number:

res = Res1D("my_results.res1d")
res.reaches['river'][0]
# ...returns first ResultGridPoint

res.reaches['river'][-1]
# ...returns last ResultGridPoint

@ryan-kipawa ryan-kipawa merged commit c0af90d into main Sep 19, 2024
4 checks passed
ryan-kipawa added a commit that referenced this pull request Oct 11, 2024
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.

Export xns11 cross sections to GeoPandas, modify, and write back to xns11 file.
1 participant