This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Search for objects created after a certain date with overpass

4
2

does anyone know if it is possible to search for ways created after a given date with the overpass-api?

asked 24 Jan '17, 19:14

Ogmios's gravatar image

Ogmios
766202639
accept rate: 25%


3 Answers:

5

A guy on the talk-it list suggested to use the query down below, and it seems to properly work for me!

[out:xml][timeout:250][adiff:"2015-01-01T00:00:00Z","2016-01-01T00:00:00Z"];
(
way["highway"]({{bbox}});
);
out body;
out meta;
>;
out skel qt;

Thanks to Andrea Albani

answered 07 Feb '17, 13:41

Constable's gravatar image

Constable
64281830
accept rate: 23%

edited 07 Feb '17, 13:50

Great, this is even better. Thanks a lot.

(07 Feb '17, 18:22) Ogmios

5

Just add (newer:"yyyy-mm-ddThh:mm:ssZ") after node, way & relation.

answered 26 Jan '17, 19:11

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

2

Vielen Dank. Das hilft mir weiter.

(26 Jan '17, 19:18) Ogmios

That's not working for me; this thing returns the object created and edited after a given date but I'm only searching for the object created after that date. thanks

(27 Jan '17, 10:54) Constable

0

I'm searching for the same exact thing but I cant figure out how to build that query. Is there anyone who can help us out? thanks

answered 26 Jan '17, 17:03

Constable's gravatar image

Constable
64281830
accept rate: 23%

edited 26 Jan '17, 17:03

2

Here is a simple example using Overpass Turbo:
http://overpass-turbo.eu/s/lxA
The newer filter selects all elements that have been changed since the given date.

(27 Jan '17, 01:35) nevw

same here; I'm only interested in objects created after a given date, the query shouldn't return the edited ones. thanks

(27 Jan '17, 10:56) Constable

I expect that you can extract the highways as they existed at two moments in time using Overpass Turbo, then open both in QGIS and get QGIS to display the difference. It may be possible to colour the difference according to whether the difference was added or extracted.

(27 Jan '17, 12:44) nevw

I expect you cannot extract a moment in time as mentioned above. Maybe the only way to do it is to get the planet file for particular dates http://planet.osm.org/planet/ Then extract the area you need using Osmosis https://wiki.openstreetmap.org/wiki/Osmosis#Extracting_bounding_boxes Then compare in Qgis.

(28 Jan '17, 14:46) nevw

Source code available on GitHub .