24

Use the Overpass Turbo API! First, I'd go to openstreetmap.org, You can either 1) Search for the feature you're after. I chose "south platte river", which runs through Denver. This gives the fields and tags that are used by OSM to store the data: 2) Identify the tags and values of the features you're after by Zooming all the way into the map Click on ...


14

overpass turbo wizard uses a template based approach to create an Overpass QL query. This way you can easily get started with Overpass API without having to deal with all the details. For many use cases the wizard creates useful queries out of the box already. Now, regarding your questions: by default, those queries include both nodes, ways and relations. ...


13

You can't get a JSON result from the XAPI-compatibility endpoint. Instead, use the standard Overpass API (“interpreter”) endpoint and put the [out:json]; at the very start of your ql query: https://www.overpass-api.de/api/interpreter?data=[out:json];node[highway=speed_camera](43.46669501043081,-5.708215989569187,43.588927989569186,-5.605835010430813);out%...


12

Using Overpass turbo, the syntax is: area["name"="Nordrhein-Westfalen"]->.boundaryarea; ( nwr(area.boundaryarea)[amenity=bank]; ); out meta; nwr is a short for node-way-relation


10

Overpass API doesn't support GeoJSON. You have to perform the conversion from JSON to GeoJSON yourself. For converting JSON into GeoJSON see this answer. It even contains a solution in Python. Another Python solution is contained in this answer.


9

You could use the following approach: [bbox:{{bbox}}]; way[highway][name="6th Avenue"];node(w)->.n1; way[highway][name="West 23rd Street"];node(w)->.n2; node.n1.n2; out meta; Try it on overpass turbo: http://overpass-turbo.eu/s/6Pb Edit: node.n1.n2; calculates the intersection of input set .n1 and .n2. Please check the documentation for details.


9

When searching for country areas instead of using {{geocodeArea:CH}} I found that this also works: area["ISO3166-1"="CH"] To retrieve a list of IDs of country areas you can query ( area["ISO3166-1"="CH"]; area["ISO3166-1"="DE"]; area["ISO3166-1"="FR"]; area["ISO3166-1"="NL"]; area["ISO3166-1"="SP"]; area["ISO3166-1"="RU"]; ); (._;>;); out; ...


9

See the Overpass API Language Guide. Basically you seem to want all data in a bounding box. Depending on your use-case you might want to download nodes, ways and relations. overpass turbo already has a preset for this. Just go to Load and select Map Call. The resulting query is: [out:xml]; ( node({{bbox}}); <; ); out meta; Change xml to json to ...


8

It's because you are expecting that embassy tags are set on a relation. Looking at TagInfo for amenity=embassy, you will see that nearly no relations were set with this key/value combination. It's in fact normal because if you look on the right panel of the OpenStreetMap wiki for the tag, like in the following screenshot, you will see that relations should ...


8

Not all buildings have a corresponding typology tag. Many are just tagged with building=yes (currently 81% of all buildings). Some might have an additional building:use=residential tag. Remember that the OSM database is primarily populated by volunteers. Some are too "lazy" to enter the building topologies, others just don't know or care about it. Feel free ...


8

You could do this using overpass that already returns a geojson object and then, if you want, you can use the geojson package to convert this object into string or save it in a file. import overpass import geojson api = overpass.API() # api.get already returns a FeatureCollection, a GeoJSON type res = api.get(""" area[name="Granollers"][admin_level=8];...


7

The Quick OSM plugin for QGIS generates the following working Overpass query: <osm-script output="xml" timeout="200"> <id-query {{nominatimArea:Austria}} into="area"/> <union> <query type="node"> <has-kv k="amenity" v="bank"/> <area-query from="area"/> </query> <query ...


7

We can formulate the answer in different ways: Option 1: Basically, you want to remove those amenity=embassy from your current result list, which have a diplomatic value that is not embassy (assuming they have a diplomatic tag at all). For this purpose, I used the - (difference) operator to reduce the current result set for each node, way and relation: [...


7

The following description assumes that you have a list of GPS positions, as well as the OSRM map matching service and Overpass API available. (1) Use OSRM Map Matching service to identify nearest roads for a trip OSRM Map matching service accepts a list of GPS positions, or some polyline and matches it to the corresponding OSM ways. This will be the first ...


6

The new QuickOSM plugin for QGIS provides a nice GUI to use the Overpass API. You can specify the key-value pairs that you want and it also offers user-friendly ways to filter by location: either bounding box or even by just specifying the region name like "Austria" for features within Austrian borders.


6

Cool project! You might take a look at MapIt: Global: MapIt is a service that maps geographical points to administrative areas. This edition is based on source data from the totally amazing OpenStreetMap project, so add your boundaries there if they’re missing. If you’re in the UK our MapIt UK with open Ordnance Survey data will probably be more useful. ...


6

The following Overpass API Query will return the center of your building: [out:json]; way(292833530); out center meta;


6

[timeout:25][bbox:{{bbox}}]; ( way["highway"="motorway"]; way["highway"="trunk"]; way["highway"="primary"]; ); out body; >; out skel qt; See it on overpass-turbo: http://overpass-turbo.eu/s/aTL


6

You might find it useful to go to OpenStreetmap and zoom to your area of interest, then use the query tool (the Question Mark icon). You don't need to be logged in to use this. Next, click on or near the water feature you want to examine - a list of candidates will appear on a panel in the left. You should hopefully be able to find the feature, and click ...


6

The river Thames is too large to digitize it in one single Openstreetmap way element. Therefore, a relation is created to group all riverbanks belonging to it. You can query that relation directly with Overpass Turbo, with no need to enter a bbox: relation(2263653);>>; out skel; You can look up the relation ID for UK rivers at http://wiki....


6

I was able to get it to work with this code: ( node[natural=peak]({{bbox}}) (if:t["ele"] > 4269.2); ); out;


6

If it's for specific cities and regions, you can use Overpass Turbo to create queries like admin_level=6 to find border ways. You'll want to consult the Tag:boundary=administrative wiki page to make sure that you're using the right admin level for the country you're looking at. If, however, you want to just extract those borders for the whole planet, you'll ...


5

Unfortunately, I think that it's not possible to make specific query from qgis. Maybe you can use overpass turbo which allows you to export data in many formats . the author tyr_asd wrote an article about exports form overpass turbo : link


5

When I manually enter a Query for ways Overpass turbo suggests an auto repair so as to also get nodes for the way. This then amounts to way(poly:"50.7 7.1 50.7 7.2 50.75 7.15")["building"]; /*added by auto repair*/ (._;>;); /*end of auto repair*/ out body; see http://overpass-turbo.eu/s/1q1 . Change out body to out ids if you really only want way IDs, ...


5

Overpass API allows you to extract by polygon: http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Select_Region_by_Polygon which should fill your needs. You can use QGIS to draw the desired polygon, then extract the coordinates with the MMQGIS plugin.


5

The query is all right. You are getting only nodes because your query area is big and the overpass server times out while processing nodes, it never gets to process the ways. Either reduce your area or set larger timeout. And if you need only major highways, you should query for highway=primary or highway = trunk.


5

You can get the Umweltzone using the following Settings in Quick OSM. Note that you can simply search for the name: Afterwards, you can use Save as ... to save to a Shapefile (or just copy the temporary Shapefile Quick OSM creates).


5

As you query to have only nodes it is that all you get. See http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Nodes for more details. Your query should be http://overpass-api.de/api/interpreter?data=(node(52.06,5.04,52.08,5.06);<;>;);out;


5

This can be easily fixed by storing the area in a named inputset (I use .a below) and referring to this inputset for both node statements: [out:json]; area[name = "New York"]->.a; ( node(area.a)[amenity=bar]; node(area.a)[amenity=restaurant]; ); out; Link to Overpass turbo: http://overpass-turbo.eu/s/a2v Some background information: In your ...


5

If I use the first example of overpy import overpy api = overpy.Overpass() # fetch all ways and nodes result = api.query(""" way(50.746,7.154,50.748,7.157) ["highway"]; (._;>;); out body; """) The resulting script give the names and the nodes of the ways. which are actualy the nodes of a LineString: for way in result.ways: print("Name: %s" % way....


Only top voted, non community-wiki answers of a minimum length are eligible