[OSM-dev] [OSM-talk] Abstract on getting historic information about usage of a node

Ian Dees ian.dees at gmail.com
Wed Sep 16 20:14:17 BST 2009


On Wed, Sep 16, 2009 at 1:41 PM, Peter Körner <osm-lists at mazdermind.de>wrote:

> Ian Dees schrieb:
>
> Can a way assume that it uses the most recent version of a node until the
>> way is changed? Then, when a way's revision number increments, all of the
>> rev#'s for the nodes that make up that way are saved along with the way's
>> history.
>>
> But this wouldn't solve the problem of "give me all ways that used node
> #50, v3" as the last time way #10 was updated it only used node #50, v1 and
> so that's the last information that's saved.
>

What's the problem with that? If way 10 did not ever use node 50v3, then it
should not be included in the "give me all ways that use node 50v3" call,
right?

(semi-ASCII-art ahead, arm your fixed-width photos)

Here's way 10v1 (numbers are nodes):

50v1----51v1----52v2

...and a history table like this:
way_id  way_rev  node_id   node_rev
10      1        50        1
10      1        51        1
10      1        52        2

I come along and move node 52, causing a rev on the way and a rev on the
node:

50v1----51v1----52v3

...and a history table becomes:
way_id  way_rev  node_id   node_rev
10      1        50        1
10      1        51        1
10      1        52        2
10      2        50        1
10      2        51        1
10      2        52        3

When you want to find all ways that used node 52v3, you would find way 10.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090916/23711ef4/attachment.html>


More information about the dev mailing list