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

Fix the exception handling for elevation download #2867

Open
Hypercookie opened this issue Aug 22, 2023 · 1 comment
Open

Fix the exception handling for elevation download #2867

Hypercookie opened this issue Aug 22, 2023 · 1 comment
Labels

Comments

@Hypercookie
Copy link

Hypercookie commented Aug 22, 2023

Describe the bug
When using the CGIARElevation provider, 0.0 will be returned for all queries.
This probably happens because the default base URL (https://srtm.csi.cgiar.org/) does time out now. (This is different from #2642). At least on my machine, this fails silently.
I don't know if this is only temporary or if this dataset has been removed.
To Reproduce

  1. Create an instance of CGIARElevation.
  2. Query the instance for any lat/long
  3. 0.0 will be returned.
  4. Look inside the cache folder. The files do exist, but they are corrupted

Expected behavior
The correct elevation should be returned. Or an exception must be thrown.

System Information

MacOS, OpenJDK 20.0.2, Graphopper 7.0

@karussell karussell added the bug label Aug 22, 2023
@otbutz
Copy link
Contributor

otbutz commented Aug 23, 2023

Seems to be back up. But we need to fix the exception handling:

} catch (IOException ex) {
demProvider.setSeaLevel(true);
// use small size on disc and in-memory
heights.create(10).flush();
return 0;
}

@karussell karussell changed the title CGIAR Elevation seems to be broken. Fix the exception handling for elevation download Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants