Skip to content

use local file if ellips server returns a HTTPError#381

Merged
rubencalje merged 3 commits intodevfrom
377-httperror-when-downloading-ahn
Nov 4, 2024
Merged

use local file if ellips server returns a HTTPError#381
rubencalje merged 3 commits intodevfrom
377-httperror-when-downloading-ahn

Conversation

@OnnoEbbens
Copy link
Collaborator

@OnnoEbbens OnnoEbbens commented Oct 24, 2024

Added a geojson with the ahn tiles and a function _get_tiles_from_file to prevent HTTPErrors when retrieving the tiles from the ellips server.

I considered removing the _get_tiles_ellipsis function and always use the geojson but then updates and changes to this file will go unnoticed, that's why I left the original function and added a try/except.

@OnnoEbbens OnnoEbbens linked an issue Oct 24, 2024 that may be closed by this pull request
@OnnoEbbens OnnoEbbens marked this pull request as draft October 24, 2024 15:07
@OnnoEbbens OnnoEbbens marked this pull request as ready for review October 24, 2024 15:07
@bdestombe
Copy link
Collaborator

bdestombe commented Oct 28, 2024

Added a geojson with the ahn tiles and a function _get_tiles_from_file to prevent HTTPErrors when retrieving the tiles from the ellips server.

I considered removing the _get_tiles_ellipsis function and always use the geojson but then updates and changes to this file will go unnoticed, that's why I left the original function and added a try/except.

What about adding a test that checks whether the local geojson is the same as the one served from the ellips server?

@rubencalje rubencalje merged commit f8cf064 into dev Nov 4, 2024
@rubencalje
Copy link
Collaborator

Ah, I merged this PR, but I may have been a bit too quick, sorry.

The columns in EllipsisDrive_index_fancy.geojson are different from the columns you normally retrieve using _get_tiles_ellipsis: for example "AHN3 maaiveldmodel (DTM) ½m" instead of "AHN3_05M_M".

I will add a fix and implement the suggestion by @bdestombe.

@rubencalje
Copy link
Collaborator

Ah, I merged this PR, but I may have been a bit too quick, sorry.

The columns in EllipsisDrive_index_fancy.geojson are different from the columns you normally retrieve using _get_tiles_ellipsis: for example "AHN3 maaiveldmodel (DTM) ½m" instead of "AHN3_05M_M".

I will add a fix and implement the suggestion by @bdestombe.

I fixed the AHN in PR #383. By default, we now use the geojson-file for the metadata of the tiles, and I added a test that checks if the geojson-file is upto-date.

@OnnoEbbens OnnoEbbens deleted the 377-httperror-when-downloading-ahn branch March 27, 2025 10:58
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.

HTTPError when downloading AHN

3 participants