Skip to content

Instantly share code, notes, and snippets.

@omerwwazap
Last active January 24, 2022 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omerwwazap/2d185957b0623c21f967c049a8f2a2ca to your computer and use it in GitHub Desktop.
Save omerwwazap/2d185957b0623c21f967c049a8f2a2ca to your computer and use it in GitHub Desktop.
Overpass Turbo - Railways near Rivers
/*
This query bring railways close to rivers
*/
[out:json][bbox:{{bbox}}][timeout:800];
// determine set of police stations
(
way["railway"="rail"];
)->.rail_p; // put them into the set "rail_p"
// determine set of banks
(
nwr["waterway"="river"];
)->.rivers_p; // put them into the set "rivers_p"
// determine set of railways near rivers
(
nwr.rail_p(around.rivers_p:50); //meters
)->.railnearrivier; // put them into the set "railnearrivier"
// show all rivers and railways
(.rivers_p; .railnearrivier;);
// return node, ways, relations as determined above
out geom meta;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment