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

Add message if no elevation data is available #373

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

bagage
Copy link
Collaborator

@bagage bagage commented Feb 24, 2021

Fix #365

@nrenner
Copy link
Owner

nrenner commented Feb 25, 2021

I would find it nice if there were also a message for partly missing elevation data, e.g. if a route is only half in the no-data-zone, and for cases like in abrensch/brouter#137, i.e. the check would be for one or more undefined alts. What do you think?

@bagage
Copy link
Collaborator Author

bagage commented Feb 25, 2021

Yes I initially wanted to handle it like this, but did not investigate the difficulty:

image

But maybe for now, a simple label that warns about partial missing elevation data could be enough?

@nrenner
Copy link
Owner

nrenner commented Feb 25, 2021

My personal opinion is, that any kind of interpolation is just an assumption and might be completely wrong, so I implemented gaps on purpose, see also GIScience/Leaflet.Heightgraph#108.

For me, a simple message to inform about partly (or all) missing data, so gaps are not interpreted as mistake, is completely fine.

@bagage
Copy link
Collaborator Author

bagage commented Feb 28, 2021

As far as I know, it is BRouter engine that gives use waypoints altitude.

If you do a route from A (no altitude known) to B (altitude known), BRouter will send a list of points without altitude, then some with altitude.
However, if you route from B to A, all points will have an altitude value (the last one known). And there is no property telling you that some elevation data is actually missing/replicated from previous points.

While I could detect the first situation easily, the second one cannot be detected easily (except by patching BRouter to add a property). Any thoughts @nrenner? What would you suggest?

PS: I cannot check for points above the 60°N 10°E-30°E limit, because there are other places on Earth where elevation data is missing (for instance here)

@nrenner
Copy link
Owner

nrenner commented Mar 1, 2021

When BRouter interpolates we can't do anything.

I was more thinking about examples where BRouter doesn't, because data is missing at the start of a segment, e.g. your via on bridge example. My idea was simply to check if any alt is undefined instead of all.

But thinking about it, it doesn't look as broken as when there is no data at all, and it shows Elevation: - m when hovering as an indication of missing data, so I would wait on feedback for such cases and am merging this now as is.

@nrenner nrenner merged commit 845a3f0 into nrenner:master Mar 1, 2021
stefankeidel added a commit to cxberlin/brouter-web that referenced this pull request Apr 8, 2021
* upstream/master:
  Update France Go area to 10km
  Update bootstrap-select dep to avoid error on mobile
  Improve modal dialogs consistency
  Rename dialog
  Make modals fullscreen on mobile
  Hide expand icon on moblie (nrenner#296)
  Gray out unselectable layers (nrenner#381)
  Update translations
  Translate overlay type and fix width computation (nrenner#379)
  Use plural form when multiple overlays are active (nrenner#378)
  Add message if no elevation data is available (nrenner#373)
  Add missing translatable content (nrenner#376)
  Remove debug code
  Update translations
  Add What's new modal (nrenner#372)
  Add Babel and core-js & regenerator polyfills (nrenner#367)
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.

communicate lack of elevation data
2 participants