# What kind of roads on a GR ###### tags: `archive` List of GR's and their relation IDs: https://wiki.openstreetmap.org/wiki/WikiProject_Belgium/Long_Distance_Walking_Routes#GR_-_Main_routes ## Get all the data from the GR For example, GR5 in Flanders is [relation 3121667](https://openstreetmap.org/relation/3121667) So we can query on overpass ([link](http://overpass-turbo.eu/s/11df)): ``` [out:xml][timeout:25]; ( relation(id:3121667); ); out meta; >; out meta qt; ``` ## GR with minimal rendering: We can render the data a little prettier (example: grey fro roads, dashed blue for paths). [Link](https://overpass-turbo.eu/s/1jID) The query is limited to what you see on the map (as requested by GR VZW) ``` [out:xml][timeout:25]; ( relation(id:3121667)->.groute; ); way(r.groute); out geom({{bbox}}); {{style: /* define general layout of road classes */ way{ color:grey; } way[highway=path],way[highway=footway],way[highway=cycleway],way[highway=bridleway]{ dashes:5,5; color:blue; } way[highway=track]{ dashes:10,10; color:blue; } }} ``` ## Summary stats for the entire GR Thanks to Midgard at https://help.openstreetmap.org/questions/77931/overpass-stats-per-value (see also) https://dev.overpass-api.de/blog/loop_and_group.html We can generate stats for every combination of highway and surface type ([link](http://overpass-turbo.eu/s/11ga)) ([link bbox version](https://overpass-turbo.eu/s/1jJu)): ``` [out:csv(highway,surface,number,length)][timeout:25]; relation(id:3121667)->.groute; way(r.groute); for->.hw (t["highway"]) { for.hw (t["surface"]) { make stat highway=hw.val, surface=_.val, number=count(ways), length=sum(length()); out; } } ``` This info can then just be copy-pasted to Excel (mind . for , in some versions!) Making some assumptions, and grouping some data this gives us this little graph: ![image](https://i.imgur.com/lorlPkf.png)