Skip to content

Commit

Permalink
Allow querying an existing station via interpolate/summarize
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Nov 29, 2022
1 parent d54e0f0 commit d598d97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -4,6 +4,9 @@ Changelog
Development
***********

- Interpolation/Summary: Now the queried point can be an existing station laying on the border of the polygon that it's
being checked against

0.49.0 (28.11.2022)
*******************

Expand Down
2 changes: 1 addition & 1 deletion wetterdienst/core/scalar/interpolate.py
Expand Up @@ -158,7 +158,7 @@ def get_valid_station_groups(stations_dict: dict, utm_x: float, utm_y: float):
for station_group in combinations(stations_dict.keys(), 4):
coords = [(stations_dict[s][0], stations_dict[s][1]) for s in station_group]
pol = Polygon(coords)
if pol.contains(point):
if pol.covers(point):
valid_groups.put(station_group)

return valid_groups
Expand Down

0 comments on commit d598d97

Please sign in to comment.