NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have an application which uses OSM data, but from one city only, which I got the data for using a query:

http://overpass-api.de/api/map?bbox=20.8672,52.1010,21.2723,52.3668

I use information about nodes and ways, put them in my database and then do some calculations on them. Now time has passed and the data changed. I'd like to see what changed, so that I can update (without dropping all the data and inserting it again)

Is there a way, to query overpass-api to give me diff of a selected area (and not only nodes or ways, but both) ? I've read the doc, but didn't find the way to combine diff and bbox in one query.

asked 01 Apr '16, 12:05

prajmus's gravatar image

prajmus
16225
accept rate: 0%


The /map query is part of the XAPI compatibility layer:

http://wiki.openstreetmap.org/wiki/Overpass_API/XAPI_Compatibility_Layer

Here's a roughly equivalent query using the Overpass API query language:

http://overpass-turbo.eu/s/foV

(fetches nodes in the bounding box and also any parent objects. To see the query url, look under "Export" for the "raw data directly from Overpass API" link.)

A global diff statement can be added to that query:

http://overpass-turbo.eu/s/foW

(returns nothing)

It'll probably be some work to figure out what's in the diff and so on, but the global diff setting is what you are looking for. You may also want to take a look at the augmented diff:

http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Delta_between_two_dates_.28.22diff.22.29

permanent link

answered 01 Apr '16, 15:13

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

I am quite unfamiliar with overpass but by coincidence have been perusing the web documentation in the last few hours and I found that 'newer' and 'changed' under Filters at this site may be what you need if you can download Attic data. The difference block statement may be suitable if you can do your query on both todays data and the date you did your extract. http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL

Also as reference: http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide

permanent link

answered 01 Apr '16, 13:03

nevw's gravatar image

nevw
9.8k2690178
accept rate: 9%

edited 01 Apr '16, 14:41

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483
×290
×275

question asked: 01 Apr '16, 12:05

question was seen: 3,562 times

last updated: 01 Apr '16, 16:14

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum