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
5
votes
1 answer

Overpass API get nearby building boundaries from a coordinate(lat/lang)

How can i get the building boundaries with single coordinate using overpass API? Right now i have a coordinate(lat/lang) but with this i would like to get the building boundaries for that perticular coordinates. Even is it possible to get the…
sunilrxg
  • 93
  • 1
  • 5
5
votes
2 answers

How to query Overpass area through leaflet?

I have a OpenstreetMap with leaflet. I'm using this Plugin for leaflet to query with Overpass. var opl = new L.OverPassLayer({ query: "(area['name'='Roma']; node(area)['amenity'='drinking_water']);out;", }); But my Map is showing nothing when…
Khan
  • 1,418
  • 1
  • 25
  • 49
5
votes
1 answer

Multiple separated requests inside a single request

With OverPass API, I would like to make several different queries in a single one, and then keep the results separated by query in the output. For example: node( )[amenity~"cafe"]->.my_cafes; node(
yolenoyer
  • 8,797
  • 2
  • 27
  • 61
5
votes
1 answer

Using coordinate and radius instead of a bounding box

My current queries look like…
H4kor
  • 1,552
  • 10
  • 28
4
votes
1 answer

Find multiple tags around coordinates with Overpass API

Given this overpass query https://overpass-turbo.eu/s/Sle, that searches for museums and galleries, how can I introduce a new type of tag to search around the same location, for example I want to also search for node["amenity"~"cafe|bar"] around the…
skamsie
  • 2,614
  • 5
  • 36
  • 48
4
votes
1 answer

How to get nodes matching multiple tags with specific value on Overpass QL

I'm trying to fetch POI's that matched with tourism=museum or historic=memorial from Overpass API. I tried different queries but cannot find right solution, i'm getting empty response. Here are not working queries area["name"="Bursa"]; …
ersinyildiz
  • 328
  • 1
  • 2
  • 14
4
votes
1 answer

OSM Overpass: Query within relation

If I want to query for certain objects within an area, it's quite easy: area(...); node(area)[natural=peak]; out; But what if the area is defined as a relation in the OSM database? I could query for the area like this ... (rel(...);>;); out; ...…
Örom Loidl
  • 366
  • 2
  • 12
4
votes
1 answer

OSM get duration and directions from route A to B in Python

I am new to working with Maps and search algorithms. Currently I am using geopy package to get distances from Nominatim from geopy.geocoders import Nominatim from geopy.distance import vincenty nom = Nominatim() chicago =…
muazfaiz
  • 4,611
  • 14
  • 50
  • 88
4
votes
1 answer

Get administrative borders with Overpass QL

I try to download the state borders of France (a few dozen states, not big data). Indeed I look for borders I can upload in my postgres database to localize POIs. OpenstreetMap seemed to be the good data source so I have tried to learn Overpass QL…
Thomas Perrin
  • 675
  • 1
  • 8
  • 24
4
votes
1 answer

OverPass API - SpeedLimit around a co-ordinates

We are developing an application, that needs to find the speed around a specific location... We were planning to use OverPass API to first the speed and tried to follow the article mentioned below. Overpass api to find the speed limit for a…
Sabarish Sathasivan
  • 1,196
  • 2
  • 19
  • 42
4
votes
1 answer

Only return selected GeoJSON elements in Leaflet

I have this code that get all OSM alley elements in a map and that has a button to print all elements retrieved with Overpass API. Instead retrieving all elements, I would like to me able to : select multiple elements on my map by clicking on…
leontalbot
  • 2,513
  • 1
  • 23
  • 32
4
votes
1 answer

Query Overpass API for roads in a specific country

I'm trying to construct a query of all 'highway=' ways in a specific area in overpass. I've been defaulting to using the {{bbox}} - but I really would prefer to do it by country. I've tried using 'nominatimArea:' instead of {{bbox}} but I get a…
user14696
  • 657
  • 2
  • 10
  • 30
4
votes
1 answer

Is there a way to get the middle of a way from Overpass API?

I´m trying to import several Ways and Nodes from the OSM. But i dont want to get the Ways as a way with different nodes, only the middle of the way. In my case, all ways are an area (Parks, Parking etc.) and i only need one point - the middle of the…
4
votes
1 answer

How can I find all nodes around a point that are members of a way with a certain tag?

I would like to find all highway way member nodes in a certain radius. I cannot see how to do this without using intersection, however, that is not in the API. For example I have this: [out:json]; way(around:25,…
z7sg Ѫ
  • 3,153
  • 1
  • 23
  • 35
4
votes
1 answer

Prevent Overpass API from returning nodes and show ways only

I'm trying to get all roads around a certain point. I'm using the following query: ( way (around:300,50.7913547,-1.0944082) ["highway"~"^(primary|secondary|tertiary|residential)$"] ["crossing"!~"."] ["name"]; >; ); out; I added…
Titan
  • 5,567
  • 9
  • 55
  • 90
1
2
3
24 25