MaZderMind / osm-history-renderer

an experimental, work-in-progress history renderer (including supplementary tools like an importer and an animation-tool)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deleted osm-features neither shown in the hist_line nor in the hist_polygon table

zehpunktbarron opened this issue · comments

Hi, I think there is a bug in the osm-history-importer.
If a way or a polygon in OSM was deleted in the past by a user this isn't written into the database (visible=false). I observed this issue only in the "hist_line" and "hist_polygon" table, not in "hist_point".
E.g. http://www.openstreetmap.org/browse/way/24272326/history. According to this the way was deleted in version 5. But my database only shows me this way in version 4 and minor 17 and hasn't got an entry for "valid_to".

deleted ways fail in write_way_to_db because no geometry can be craftet. The reason for that is, that a deleted way has no nd-references.

This is similar to nodes which have no lat/lon (see #8). They are imported with visible=f and an geom that nearly points to 0/0 (despite of transformation-artifacts).

It would be better to import deleted nodes AND ways with a NULL geom.
For ways that means looking at the geom and the tags of the previous version of the way to determine if the line should go into the poly or the line table.