Closed GoogleCodeExporter closed 8 years ago
Here is an updated hash funciton that shouldn't collide for most sources:
It allows for 256 zoom levels, and 28 bits for x and y.
uint64_t RMTileHash(RMTile tile)
{
uint64_t zoom = (uint64_t) tile.zoom & 0xFFLL; // 8bits, 256 levels
uint64_t x = (uint64_t) tile.x & 0xFFFFFFFLL; // 28 bits
uint64_t y = (uint64_t) tile.y & 0xFFFFFFFLL; // 28 bits
uint64_t hash = (zoom << 56) | (x << 28) | (y << 0);
return hash;
}
Original comment by tracy.harton
on 26 Mar 2009 at 12:47
Fixed in r398/r404
Original comment by tracy.harton
on 26 Mar 2009 at 5:22
Original issue reported on code.google.com by
tracy.harton
on 26 Mar 2009 at 12:46