Hi Michał, Am 12.12.2017 um 01:11 schrieb Michał Brzozowski: > Hi all, so I have a problem with user rowers2 who has been tracing > buildings (with Tracer2) quite carelessly. After doing this (which he does > in quite high volume) he then merges address nodes with building outlines. > E.g. https://nrenner.github.io/achavi/?changeset=53993885 > JOSM has an option to merge (by copying tags and deleting the node) address > nodes into building outlines. However, it can also merge POI whenever they > have address tags, which isn't always appropriate, e.g. for ATMs or > anything that doesn't occupy the whole building (quite easy to tell by > common sense, but not really automatically). > > I stumbled into this ATM shenanigans purely by chance in PostGIS when > searching for nodes inside areas which both have same amenity value. But > this pertains also to other POI like tourism=information. > > How can I, having a full history dump for an area, find all POI nodes > (having shop/amenity/office...) that were deleted by user rowers2? > > Or, which DB schema can deal with history reasonably?
You don't need a database, just a regional extract of the full history dump. You can download full history extracts from Geofabrik Downloads (history extracts are updated weekly). You can process them using the Osmium C++ library or Pyosmium. These files are ordered by type, ID and version. If you want to use C++, write a handler class (derived from osmium::handler::Handler). Osmium will call the methods node(), way(), relation() etc. for each node/way/relation while reading the input file. If osmium::OSMObject::deleted() returns true for an OSM object, it is a deleted version. You could start with https://github.com/osmcode/libosmium/blob/master/examples/osmium_count.cpp as a base. You might also have a look at the Osmium Manual at http://osmcode.org/libosmium/manual.html Using the Python bindings might be easier to start but probably slower to process. http://docs.osmcode.org/pyosmium/latest/intro.html#reading-osm-data Best regards Michael -- Per E-Mail kommuniziere ich bevorzugt GPG-verschlüsselt. (Mailinglisten ausgenommen) I prefer GPG encryption of emails. (does not apply on mailing lists)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev mailing list dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev