User Tools

Site Tools


using_overlay_to_extract_data_from_openstreetmap

Using Overlay to extract data from OpenStreetMap

I used the following Overlay files to measure the amount of cycle lanes in cities:

[out:csv(length,value)];
area[name="London"]->.a;
way[highway](area.a);
for (t["highway"])
{
  make stat value=_.val,length=sum(length());
  out;
}
[out:csv(length,value)];
area[name="London"];
way[highway="cycleway"];
out
for (t["highway"])
{
  make stat value=_.val,length=sum(length());
  out;
}
[bbox:{{bbox}}];
( 
  way["highway"="cycleway"];
);
out geom;
[out:csv(length,value)];
area[name="Isle of Man"]->.a;
way[highway="cycleway"](area.a);
for (t["highway"])
{
  make stat value=_.val,length=sum(length());
  out;
}
[out:csv(length,value)];
area[name="Isle of Man"]->.a;
way[highway="cycleway"](area.a);
make stats length=sum(length());
out;
[out:csv(length,value)];
area[name="London"]
.way[highway="cycleway"]
.way[cycleway="sidewalk"];
make stats length=sum(length());
out;
[out:csv(length,value)];
area[name="London"];
way[highway="cycleway"](area)->.a;
way[highway="cycleway"](area)->.b;
way.a.b;
make stats length=sum(length());
out;
[out:csv(length,value)];
area[name="London"];
way[highway="cycleway"](area)->.a;
way[cycleway!="sidewalk"](area)->.b;
way[foot!="yes"](area)->.c;
way.a.b.c;
make stats length=sum(length());
out;
using_overlay_to_extract_data_from_openstreetmap.txt · Last modified: 2022/01/13 20:10 by abeverley