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

Add missing dfsu read x,y test #779

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Add missing dfsu read x,y test #779

merged 2 commits into from
Jan 24, 2025

Conversation

ecomodeller
Copy link
Member

@ecomodeller ecomodeller commented Jan 21, 2025

Dfsu2DH.read(x=, y=) can be used to read a number of positions (stations).

Inspired by discussion in #482

image

@Hendrik1987 is this good enough, or would you still prefer a extract_stations method?

@Hendrik1987
Copy link
Contributor

Hendrik1987 commented Jan 22, 2025

@ecomodeller :
Thanks for keeping our old discussions in mind :-)

If your solution under the hood avoids reading all elements or in some other way handles larger than memory files, then this is amazing! I think, no need to introduce a dedicated extract_station method.

I rather think it could be useful to also here include a n_nearest argument, allowing to use the interpolation methods on the ds afterwards. This would result in loading also these neighbouring elements in addition to the ones in your plot above. In fact, the current ds interpolation does not define a max distance, or does it? I.e., blindly interpolating on the subset you show above with default n_nearest, would lead to unexpected restults.

@Hendrik1987
Copy link
Contributor

@irnigerandrea: Don't you think this could be useful for us?

@ecomodeller ecomodeller merged commit fb3dda2 into main Jan 24, 2025
7 checks passed
@ecomodeller ecomodeller deleted the test_dfsu_read_x_y branch January 24, 2025 07:02
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