Re: [OSM-dev] Getting historical entries - now deleted

2019-10-11 Thread Andy Townsend

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
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Getting historical entries - now deleted

2019-10-11 Thread Michael Reichert
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 GmbHHandelsregister: HRB Mannheim 703657
Amalienstr. 44Geschaeftsfuehrung: C. Karch, F. Ramm
76133 Karlsruhe   Tel: 0721-1803560-3
reich...@geofabrik.de Fax: 0721-1803560-9



signature.asc
Description: OpenPGP digital signature
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Getting historical entries - now deleted

2019-10-11 Thread 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
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev