how do I query Overpass Turbo to retrieve just the polylines of the London Underground…
- User
how do I query Overpass Turbo to retrieve just the polylines of the London Underground rail lines
- Assistant
To query Overpass Turbo for just the polylines of the London Underground rail lines, you can use the following query:
code[out:json]; ( way["railway"="subway"]["network"="London Underground"](poly:"{51.505,-0.115}")->.rail; ); (._;>;); out body; >;This query will retrieve all ways that are tagged as "railway=subway" and "network=London Underground" within a certain bounding box. You can adjust the coordinates in the "poly" parameter to define the bounding box to search within.
You can run this query in Overpass Turbo and it will return the polylines of the London Underground rail lines in JSON format. You can then export the data in GeoJSON format or any other desired format for further analysis or visualization.
- User
this is my overpass turbo query '/* This has been generated by the overpass-turbo wizard. The original search was: “'railway'='subway' in London” */ [out:json][timeout:25]; // fetch area “London” to search in {{geocodeArea:London}}->.searchArea; // gather results nwr"railway"="subway"; // print results out geom;' This gives me a lot of data which isn't railway lines. How do I get only the polylines for the actual London Underground lines
- Assistant
To get only the polylines for the actual London Underground lines in your Overpass Turbo query, you can filter the results further by specifying the "network" tag value as "London Underground". Here is an updated query:
code[out:json][timeout:25]; // fetch area “London” to search in {{geocodeArea:London}}->.searchArea; // gather results way["railway"="subway"]["network"="London Underground"](area.searchArea); // print results out geom;In this updated query, we have added the filter
["network"="London Underground"]to only retrieve the subway lines that are part of the London Underground network. This should help narrow down the results to only the actual London Underground lines in the returned polylines.You can run this updated query in Overpass Turbo to get the polylines for the London Underground rail lines specifically.
- User
Can you adapt this Overpass Turbo query to retrieve the data for just the Jubilee Line of the London Underground
- Assistant
To retrieve the data for just the Jubilee Line of the London Underground using Overpass Turbo, you can specify the "ref" tag value as "Jubilee" in your query. Here is the adapted query:
code[out:json]; // Fetch area "London" to search in {{geocodeArea:London}}->.searchArea; // Gather results for the Jubilee Line way["railway"="subway"]["network"="London Underground"]["ref"="Jubilee"](area.searchArea); // Print results out body; >;In this adapted query, we have added the filter
["ref"="Jubilee"]to specifically retrieve the data for the Jubilee Line of the London Underground. This will filter the results to only include the polylines for the Jubilee Line.You can run this query in Overpass Turbo to fetch the data for just the Jubilee Line of the London Underground.
- User
how would I query Overpass Turbo for "railway"="subway" rel(7673326)
- Assistant
To query Overpass Turbo for "railway"="subway" relation with a specific ID (7673326), you can use the following query:
code[out:json]; // Get the specific relation with ID 7673326 rel(7673326); // Filter to only include subway railways way["railway"="subway"](r); // Print the results out body; >;In this query, we first retrieve the relation with the specific ID of 7673326 using the
rel()function. Then, we filter the results to only include the ways that are tagged as "railway"="subway" and are part of the retrieved relation. Finally, we print the results which will contain the polylines for the Subway railway within the specified relation.You can run this query in Overpass Turbo to retrieve the data for the "railway"="subway" relation with the ID of 7673326.