Questions tagged [overpass-api]

The Overpass API (or OSM3S) is a read-only API that serves up custom selected parts of the OpenStreeetMap map data.

The Overpass API (or OSM3S) is a read-only API that serves up custom selected parts of the OpenStreeetMap map data (elements and tags) via a specifically crafted query language. It acts as a database over the web: the client sends a query to the API and gets back the data set that corresponds to the query.

Unlike OSM's main API, which is optimized for editing, Overpass API is optimized for data consumers that need a few elements within a glimpse or up to roughly 100 million elements in some minutes, both selected by search criteria like e.g. location, type of objects, tag properties, proximity, or combinations of them. It acts as a database backend for various services.

The overpass turbo frontend allows to interactively run Overpass API queries and analyze the resulting data on a map.

361 questions
0
votes
1 answer

Overpass API - How to get all sustance amenities

I am using the Overpass API in order to fetch all the amenities. All the amenities are listed on the OSM wiki: Amenities. I cannot seem to get this to work. I first have tried "amenity"="pub;bar;restaurant". But this does not work and I need to type…
Stephen
  • 913
  • 3
  • 24
  • 50
0
votes
1 answer

Error: Overpass query unavailable without internet while connected to internet

I am getting an error while trying to use osmdata package. I removed package and re-installed it and still get the weird error. Here is what I am trying to do: library(osmdata) tehran <- opq(bbox = 'Tehran, Iran') %>% add_osm_feature(key =…
0
votes
1 answer

R how can I get only ways from Overpass API and reduce the amount of data

Im trying to reduce the amount of data and time a query to overpass server takes. Im only interested in ways and by using osmdata Package this is my current approach: library(osmdata) bbox_dimensions <-c(xmin=11.2360151977671, ymin=…
Andreas
  • 397
  • 4
  • 18
  • 37
0
votes
1 answer

How to query with country name in overpass

i am trying to query all the branchs of deutsche bank in germany. please let me know why the below code does not return any results code: area["place"="country"]["name:de"="Deutschland"]->.s; ( node.s ["amenity"="bank"] ["brand"="Deutsche…
Amrmsmb
  • 1
  • 27
  • 104
  • 226
0
votes
1 answer

Downloading osm data in geospatial format

I am trying to download osm data from this relation for a waterway. https://www.openstreetmap.org/relation/3396950#map=10/13.0280/75.8894 The option to download XML is available, and I have used QuickOSM plugin in QGIS, and used Overpass Turbo…
redred3
  • 1
  • 1
0
votes
1 answer

How to visualize and convert retrieved OSM buildings data to shapefile?

I have retrieved data from OSM using this script: import overpy api = overpy.Overpass() print('Obtaining Data...') result = api.query(""" [out:json] [timeout:25] ; ( relation ["building"] …
hbk
  • 141
  • 6
0
votes
1 answer

Overpass API: Recurse up and filter

I want to find all ways containing a specific node. I do so with: [out:json]; ( node(); <; ); out body; Now is there a way to filter the result I got using the recurse up? I would like to receive…
paupau
  • 3
  • 2
0
votes
1 answer

Get the list of cities, suburbs with relations from Overpass-turbo

I'm struggling to build a mini database set for with the following structure {countryId, governorateId, cityId} The idea is: I need to find all admin_level=4 for Egypt, then for each result, get the cities|suburb|town Example: Cairo: ['Nasr City',…
Roshdy
  • 1,703
  • 3
  • 25
  • 34
0
votes
1 answer

How to export the roadmap including traffic_signals and street_lamps of a city?

I would like to get some statistics about the roads, their deployed traffic lights, and the lampposts. Is there any way to get these statistics immediately for Shenzhen (China) city? Secondly: how can I export the road network of a specific city…
Ahmad Alhilal
  • 444
  • 4
  • 19
0
votes
1 answer

how can i get all the residential nodes in a specific region in overpass turbo?

I'm new to osm queries and I explore it using overpass turbo so I'm trying that gets a specific way with a predefine id the code looks like this if anyone would like to test [bbox:40.73112,-73.89061,40.73391,-73.88807]; // gather results ( …
noob
  • 672
  • 10
  • 28
0
votes
1 answer

define a specific location to extract "residential" data from it

I'm new at OpenStreetMap and overpass-turbo i did write a code to extract residential from the country of Qatar and it works fine but if I would like to define a specific location based on west, east, north, south location like what we do in…
noob
  • 672
  • 10
  • 28
0
votes
1 answer

How to concatenate strings in overpass query

I am trying to write a function that takes lat and lon gps coordinates as variables for a query to overpy (openstreemap). Here is what I have tried: def query_overpass(lat, lon): import overpy api = overpy.Overpass() result =…
Kyv
  • 615
  • 6
  • 26
0
votes
1 answer

Extract all polygons states of a country

I need polygons of states in my Country. After many tries, I got to this. It does return the states of my country, but there are no paths and many items that I did not want. I've been using http://overpass-turbo.eu/ to test my…
Akxe
  • 9,694
  • 3
  • 36
  • 71
0
votes
0 answers

Get polygon shapefile/KML for a node/location in openstreetmap

I have about 1000 nodes/locations of interest from openstreetmap. I queried Overpass API to get coordinates of those 1000 locations/nodes. What I am interested in is, getting a polygon based KML/shapefile for each of those 1000 locations. So…
0
votes
1 answer

Spatial Looping in Python

I try to loop trough a bounding box and query buildings to populate a GIS project. Since the bounding box is quite large, I wrote a loop to split up the big bounding box into smaller ones which also result in separate GeoJSONS which I can import…
linusrg
  • 3
  • 1