Getting historical entries - now deleted

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting historical entries - now deleted

Jóhannes Birgir Jensson
Hello

I'm trying to figure out how to get historical entries of bus stops in Iceland but other than getting lots of old snapshots and parsing them I'm out of ideas.

Any optimal route to do this?

--Jóhannes / Stalfur


_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Getting historical entries - now deleted

Michael Reichert-2
Hi Jóhannes,

Am 11.10.19 um 12:44 schrieb Jóhannes Birgir Jensson:
> I'm trying to figure out how to get historical entries of bus stops in Iceland but other than getting lots of old snapshots and parsing them I'm out of ideas.
>
> Any optimal route to do this?

Take the historic planet file extract for Iceland from
https://osm-internal.download.geofabrik.de/europe/iceland.html and
iterate over the contents of the file. It is ordered by type (node, way,
relation), ID and version. If an object with ID n is visible has
highway=bus_stop in version v and not visible (i.e. deleted) in version
n+1, you have found one of the bus stops you are looking for.

There are multiple options how to do that. The following list is sorted
by performance (slowest last):

(1) Write a small C++ programme using the Osmium C++ library. You can
use
https://github.com/Nakaner/FiTaDel/blob/master/tag_change_checker.cpp as
an example. The exmaple reads a history file and counts objects which
had building=* in version v but building=yes in version v+1 if version
v+1 was uploaded by a user with a given UID.

(2) The same but in Python using Pyosmium.

(3) osmium cat --output-format=opl iceland-internal.osh.pbf \
  | grep -A 1 "highway=bus_stop" \
  | grep -v "highway=bus_stop"

Best regards

Michael



--
Michael Reichert      www.geofabrik.de
Geofabrik GmbH        Handelsregister: HRB Mannheim 703657
Amalienstr. 44        Geschaeftsfuehrung: C. Karch, F. Ramm
76133 Karlsruhe       Tel: 0721-1803560-3
[hidden email] Fax: 0721-1803560-9


_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting historical entries - now deleted

Andy Townsend
In reply to this post by Jóhannes Birgir Jensson
On 11/10/2019 11:44, Jóhannes Birgir Jensson wrote:
Hello

I'm trying to figure out how to get historical entries of bus stops in Iceland but other than getting lots of old snapshots and parsing them I'm out of ideas.

If you don't want a huge area, and know a time when the names were "correct" then an Overpass query for a date might work, for example:

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

There's lots more info in the OSM wiki about this sort of query, so you may be able to find something there.

Best Regards,

Andy



_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev