Heightgraph currently doesn't handle cases where part or all of the data points have coordinates, but no elevation/altitude value.
This results in incomplete graphs and NaN errors/warnings, see comparison below and the Plunker console:
Diagrams shown are variants of the same elevation profile with missing values at different positions:
- original
- middle (left of second segment)
- left
- right
- all missing
Reasons for missing elevation data e.g. are using CGIAR CSI SRTM that has no data beyond 60 degrees north and south and outside shorelines, see abrensch/brouter#137, nrenner/brouter-web#203.
The suggested solution would be to show missing elevation values as gaps by using a d3 defined accessor function, e.g. here:
d3Area().defined(d => d.altitude !== undefined && d.altitude !== null)
I guess I could provide a PR if no one else feels like it.
Heightgraph currently doesn't handle cases where part or all of the data points have coordinates, but no elevation/altitude value.
This results in incomplete graphs and NaN errors/warnings, see comparison below and the Plunker console:
Diagrams shown are variants of the same elevation profile with missing values at different positions:
Reasons for missing elevation data e.g. are using CGIAR CSI SRTM that has no data beyond 60 degrees north and south and outside shorelines, see abrensch/brouter#137, nrenner/brouter-web#203.
The suggested solution would be to show missing elevation values as gaps by using a d3 defined accessor function, e.g. here:
I guess I could provide a PR if no one else feels like it.