Elevation providers cannot contribute to info.copyrights

Author: zdilaCreated Sep 3, 2026Updated Sep 3, 2026

Summary

info.copyrights is a static list from GraphHopperConfig, and no elevation provider can add to it. So a client has no way to learn whose terrain data shaped a route — for any provider, not just one.

Note this is not limited to responses that return elevation. Once a graph is imported with an elevation provider, the DTM shapes every route from it: average_slope / max_slope custom models weight by it (per docs/core/elevation.md), and ascend / descend are derived from it. A client that asks for elevation=false still gets a path computed from that data. The attribution therefore belongs to the graph, not to the response flag — which is also why merging the provider's list into info.copyrights unconditionally (proposal 1 below) is the right shape.

Current behaviour

GraphHopperConfig seeds the list, and nothing else ever writes to it:

java
public GraphHopperConfig() {
    // This includes the required attribution for OpenStreetMap. Do not remove it.
    copyrights.add("GraphHopper");
    copyrights.add("OpenStreetMap contributors");
}

RouteResource, IsochroneResource, PtRouteResource and PtIsochroneResource all emit config.getCopyrights() unchanged, and a repo-wide search for copyrights has no hits under core/src/main/java/com/graphhopper/reader/dem.

A POST /route with "elevation": true returns 3D coordinates, and reports the same two entries it would for a request that asked for none:

json
"info": {"copyrights": ["GraphHopper", "OpenStreetMap contributors"], "took": 159}

Why it matters

Several supported providers carry attribution obligations that the project already acknowledges in prose but cannot express through the API:

  • SkadiProvider javadoc: "See https://github.com/tilezen/joerd/blob/master/docs/attribution.md for required attribution of any project using this data."
  • docs/core/elevation.md on Mapterhorn: "As it contains many sources the attribution is a longer list that you can find here."
  • Sonny (#2823, added in #3183) is the sharpest case: it is a composite of national agency datasets whose licences (DL-DE/BY-2.0, OGL v3 and others) each ask for their own source line.

For scale — we run a self-hosted instance whose elevation provider is Sonny. Asked about that same dataset, our own attribution resolver returns 8 credits for a point in Scotland and 18 for one in Germany. info.copyrights returns 2.

Workaround, and why it is poor

setCopyrights is a public setter, so an operator can set copyrights: in config.yml. But it replaces the list rather than extending it — including the OpenStreetMap entry the code explicitly says not to remove — and it is graph-wide, so every response would carry every source in the graph even for a route confined to one country.

Proposal

  1. Let the configured ElevationProvider expose an attribution list that is merged into info.copyrights, additively, leaving the defaults in place. This is cheap and would be enough to discharge the obligation.
  2. Ideally, report only the sources the returned path actually used. This is much harder — elevation is baked into the graph at import time and per-edge provenance is not retained — so it seems a stretch goal rather than a prerequisite for (1).

#2806 added road_data_timestamp to info to carry OSM data provenance; this is the same idea applied to elevation.