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

Incorrect distance calculation between hydro stations and hydro basins #55

Closed
timtroendle opened this issue Apr 8, 2021 · 3 comments · Fixed by #138
Closed

Incorrect distance calculation between hydro stations and hydro basins #55

timtroendle opened this issue Apr 8, 2021 · 3 comments · Fixed by #138
Assignees
Labels
bug Something isn't working data hydro Issues related to hydroelectricity
Milestone

Comments

@timtroendle
Copy link
Member

When a hydro station is not within any of the existing hydro basins we move it into the closest one. The rationale is that the station in fact is within the basin, but that the data is imprecise.

There are two issues with the current approach:

  1. We use a geographic CRS (WGS84) which does not lead to meaningful distances.
  2. We do not test the assumption that distances are small.

We should fix it the following way:

  1. Move to a projected CRS (EPSG3035).
  2. Test that the distance is small. This should be controlled by a parameter from config with default 10km(or smaller?).
@timtroendle timtroendle added bug Something isn't working hydro Issues related to hydroelectricity data labels Apr 8, 2021
@timtroendle timtroendle added this to the 1.1 milestone Apr 8, 2021
@timtroendle
Copy link
Member Author

The impact of this bug is likely small.

@timtroendle
Copy link
Member Author

timtroendle commented Apr 8, 2021

In fact, we move stations by less than 1 arcminute (<1km) already (controlled by the parameter buffer_size). So that's fine. Still, it would be better to use a projected CRS.

UPDATE: As pointed out by @brynpickering, the parameter should move to config.

timtroendle added a commit to timtroendle/euro-calliope that referenced this issue Jul 21, 2021
Fixes calliope-project#55.

This was not exactly broken, but let to warnings by geopandas. Further, the buffer size is now the same for all stations that must be moved and the buffer size is easier to understand.
@timtroendle timtroendle self-assigned this Jul 21, 2021
@timtroendle
Copy link
Member Author

The fix moves the centroid of the continent from lat lon (53.94, -4.04) to (53.87, -3.99).

jnnr pushed a commit to jnnr/euro-calliope that referenced this issue Aug 27, 2024
Fixes calliope-project#55.

This was not exactly broken, but let to warnings by geopandas. Further, the buffer size is now the same for all stations that must be moved and the buffer size is easier to understand.
jnnr pushed a commit to jnnr/euro-calliope that referenced this issue Sep 3, 2024
Fixes calliope-project#55.

This was not exactly broken, but let to warnings by geopandas. Further, the buffer size is now the same for all stations that must be moved and the buffer size is easier to understand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data hydro Issues related to hydroelectricity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant