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
4
votes
2 answers

Query Overpass API for roads with crossing bridges/railways

I'm trying to query OpenStreetMaps through the Overpass API. What I want to query is roads inside a bounding box that has any kind of bridges crossing above, like railway bridges etc. I found this example, that does just about what I need:…
MartinHN
  • 19,542
  • 19
  • 89
  • 131
4
votes
1 answer

Is there a Python library for OpenStreetMap Overpass API?

I have found this API for the main OpenStreetMap API http://wiki.openstreetmap.org/wiki/PythonOsmApi. Is there a similar Python API for overpass-api?
poshanniraula
  • 683
  • 1
  • 7
  • 14
4
votes
2 answers

overpass api - requesting any node that has tag

I was wondering if it's possible to request via overpass API "any node that has at least one tag of any kind". The only way I see right now is to sopecify all the existing tags in a huge union request (see below), or requesting nodes without the…
its me
  • 231
  • 2
  • 7
4
votes
1 answer

Overpass API: Get all public transport stops with a certain name

I'm using the Overpass API to query OpenStreetMap for bus stops with a certain name near a specified…
Patrick
  • 3,091
  • 4
  • 26
  • 29
3
votes
1 answer

How can I add timestamp in osmdata_sf() results?

When I query osm data, I want to receive the timestamp, when some object was added or changed, is it possible to include this data? There is my query: q <- opq("London",timeout = 20000) %>% add_osm_feature(key = "landuse",…
vanhry
  • 31
  • 3
3
votes
2 answers

How to get the address from coordinates with Open Street Maps API?

I developed an open-source APP in Cordova (it uses Javascript) and I'm using the Google Maps API, though as the APP is becoming popular my bill is increasing (not nice for a free, ad-free APP). Thus I'd like to move to Open Street Maps. I've been…
João Pimentel Ferreira
  • 14,289
  • 10
  • 80
  • 109
3
votes
1 answer

How can i check if the file is empty?

I want to check if the json file is empty. Where in the code do i check that properly? This is my code: import os import sys import traceback import json import requests from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) try: …
3
votes
1 answer

How to use overpass api?

I am a total newbie so this may be a silly question, but I can't find any tutorials on how to query overpass api to display things on own website. Do I install it on my server or is there a code to query it in the script? What I want to achieve is…
monilus98
  • 43
  • 1
  • 5
3
votes
0 answers

Create field boundary for closed GPS points without using Clustering technique

Recently I encountered a problem with the machine traversal on a farm. It so happens that the GPS is turned ON even when the machine is traveling on the road. As shown in the figure below (just an example). I want to figure out how do we just…
NMSD
  • 484
  • 6
  • 18
3
votes
2 answers

How to get shape country (without maritime limit...only terrain) in Overpass?

I am trying to get the shape of country in Overpass API without the maritime limit in http://overpass-turbo.eu And I have this query but it shows the maritime: relation ["boundary"="administrative"] ["admin_level"="2"] …
tres.14159
  • 850
  • 1
  • 16
  • 26
3
votes
1 answer

Is there a way to get results for an overpass query paginated?

Let's say I want to get restaurants in Berlin and I have this query: [out:json]; area["boundary"="administrative"]["name"="Berlin"] -> .a; ( node(area.a)["amenity"="restaurant"]; ); out center; Let's say this result set is too big to extract in…
Sofia Bravo
  • 579
  • 8
  • 22
3
votes
1 answer

Fixing gaps in osm roads when plotting with ggplot2/ geom_sf

When plotting road data downloaded from osm using osmdata, the resulting plot has gaps in it when using larger values of size in geom_sf (see image). Here is a reproducible example using a section of road in SW London. How can I remove the white…
Chris
  • 3,836
  • 1
  • 16
  • 34
3
votes
1 answer

osm overpass query by country

I am using this Overpass query to extract all coworking amenities in Italy. ( area["ISO3166-1"="IT"];) ->.a; node["amenity"="coworking_space"] (area.a); (._;>;); out body; If I try to do the same for France using FR as…
Jacopo
  • 153
  • 1
  • 3
  • 10
3
votes
1 answer

Does bbox-query return ways that are partially in the bounding box?

I'm trying to figure out if Overpass-API's bbox-query should be returning ways that: Are entirely enclosed by the box (all nodes are inside the box) Have at least one node inside the box. At least one segment intersects with the box (even if no…
O'Rooney
  • 2,878
  • 2
  • 27
  • 41
3
votes
0 answers

Search object by key from json layer made by overpass api

Im building sport facilities map based on leaflet. Im using Overpass API to get object data and make one layergroup for one type sports facilites. var swimming = new L.LayerGroup(); var swimming_node = new L.layerJSON({ url:…
ems
  • 31
  • 2
1 2
3
24 25