Skip to content

Add support for Sonny's LiDAR 1" elevation provider - #3183

Merged
karussell merged 2 commits into
graphhopper:masterfrom
ratrun:sonnyDTM
Nov 12, 2025
Merged

karussell merged 2 commits into
graphhopper:masterfrom
ratrun:sonnyDTM

Conversation

@ratrun

@ratrun ratrun commented Aug 2, 2025

Copy link
Copy Markdown
Contributor

For the use-case of a not public graphhopper instance, I added support for Sonny's LiDAR Digital Terrain Models of Europe as elevation provider. The advantage is that for the covered area in Europe the DTM data is much better compared to CGIAR data. The disadvantage is that the data is not free to use!

Although I expect that this won't get merged due to the licensing issues and because the data does not get automatically fetched, I decided to create this public pull request such that this work does not get lost. It still could be useful for certain scenarios.

@ratrun ratrun changed the title Adding support for Sonny's LiDAR 1" elevation provider Add support for Sonny's LiDAR 1" elevation provider Aug 4, 2025
@mprins

mprins commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

to the licensing issues and because the data does not get automatically fetched

Why would that be a problem? Isn't that up to the user that downloads the extra data

@karussell

karussell commented Sep 8, 2025 •

Copy link
Copy Markdown
Member

Why would that be a problem? Isn't that up to the user that downloads the extra data

IMO it would be similar to using a closed source library (?) But maybe not that bad when it is not used by default and properly documented?

Or, what if we could define a list of polygons to exclude these areas (as part of this elevation provider?) and use some fallback?

@karussell karussell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my change request. Afterwards I can merge this PR, lgtm. Did you test it already in production?

Comment on lines +67 to +90
@@ -87,6 +87,6 @@ public void testGetEle() {
assertEquals(108, instance.getEle(60.0000001, 16), precision);
assertEquals(0, instance.getEle(60.0000001, 19), precision);
// Stor Roten
assertEquals(14, instance.getEle(60.251, 18.805), precision);
assertEquals(4, instance.getEle(60.251, 18.805), precision);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this change out into a separate PR? I think it is just the fix in core/MultiSourceElevationProvider.java which is unrelated to this PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is just the fix in core/MultiSourceElevationProvider.java which is unrelated to this PR?

This is true. It was not detected previously because this test is disabled. I'll create a separate PR after the merge if I don't forget 🥲

@ratrun

ratrun commented Nov 11, 2025 •

Copy link
Copy Markdown
Contributor Author

Did you test it already in production?

Well, as graphhopper is just a hobby of mine I won't call it "production", but I did plan a 10 days bicycle tour in covered parts of Europe in hilly terrain and didn't notice problems.

@karussell karussell added this to the 12.0 milestone Nov 12, 2025
@karussell

Copy link
Copy Markdown
Member

Sorry, meant more "real world" than "production" :)

@karussell
karussell merged commit 25903cd into graphhopper:master Nov 12, 2025
@ratrun

ratrun commented Nov 12, 2025

Copy link
Copy Markdown
Contributor Author

@karussell I don't know how you managed to create commit 6168f2c, but thank you. Now there is no need any longer for fixing the disabled test.

@karussell

Copy link
Copy Markdown
Member

@karussell I don't know how you managed to create commit 6168f2c, but thank you.

It is an unsigned commit with your changes and you as the author :) (git commit -m "..." --author "ratrun <[email protected]>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants