digidem / osm-p2p-db

Peer-to-peer database for OpenStreetMap data
BSD 2-Clause "Simplified" License
235 stars 25 forks source link

store versions to compare historical edits #21

Closed ghost closed 7 years ago

ghost commented 8 years ago

Ways and relations only refer to refs by their id, so it's hard to compare what a way looked like at the time it was created.

gmaclennan commented 8 years ago

Thinking about this more... this does increase the chance of forks being created, i.e. without this two users could move some nodes in a way and the way would not appear as forked. Is there a way around this by comparing the seq number of nodes within a way to the seq of the way, hence knowing which nodes have been edited since the way version was edited? That would be enough to be able to show a history of the geometry of the way.

I don't think this is needed for relations. I also wonder whether we should be internally storing members on the relation object at all? Instead store a owners property on the members of a relation? The order of members in a relation does not matter. Ideally we can store long ways (rivers, paths, roads) as relations and minimize conflicts / forks when different users edit different parts of a way. This way additional ways could be added to a relation without bumping the version number of the relation itself.

gmaclennan commented 7 years ago

Moved to #49