On 19 June 2013 16:25, Ian Dees <[email protected]> wrote: > The last bit of work before I can call it complete is to correctly expire > tiles based on the minutely diffs. The naive and incorrect approach would be > to expire based on node changes. This ignores changes to way and relation > tags, for example.
> Any thoughts on how to do this correctly and efficiently? I think the correct way is, for each tile, to store the list of nodes, ways and relations returned within that tile. For example, the map call walks up the tree from nodes -> ways, but then also back down the three from ways -> nodes in order to complete the way. So if a minutely diff marks an entity as expired, I can't see any other way to determine which tiles that request is mentioned in, beyond re-creating every tile from scratch, or doing some complex graph walking. Even for a simple node tag change, that node could appear in any (or all) tiles, and doing an exhaustive search of all the ways and relations that mention it, and relation members in turn, to find every possible bounding box seems the wrong way. So basically, when generating a tile, store an entity -> tile lookup table too. When regenerating a tile, flush the entity -> tile store for that tile and repopulate. Cheers, Andy _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

