diff --git a/docs/design/designdoc.rst b/docs/design/designdoc.rst index e2e4edc..2d1fb04 100644 --- a/docs/design/designdoc.rst +++ b/docs/design/designdoc.rst @@ -547,6 +547,20 @@ absolute position 136. So this example requires zoom level 8 (at least in the horizontal direction. The vertical direction must also be checked). +Quadtree Paths +-------------- + +To illustrate the relationship between tile col,row addresses and their path, +consider these 16 tiles from a depth 2 quadtree: + +.. image:: quadtree/depth2addresses.png + :alt: Addresses and paths for 16 tiles in a depth 2 tree + +The top address in each tile is the col,row address, where the chunk outlined in +green in the center is at 0,0. The lower address in each tile is the path. The +first number indicates which quadrant the tile is in overall, and the second is +which quadrant within the first one. + get_range_by_path ----------------- .. Explain the quadtree.QuadtreeGen._get_range_by_path method diff --git a/docs/design/quadtree/depth2addresses.png b/docs/design/quadtree/depth2addresses.png new file mode 100644 index 0000000..af7c7bc Binary files /dev/null and b/docs/design/quadtree/depth2addresses.png differ diff --git a/docs/design/quadtree/depth2addresses.svg b/docs/design/quadtree/depth2addresses.svg new file mode 100644 index 0000000..548c1f1 --- /dev/null +++ b/docs/design/quadtree/depth2addresses.svg @@ -0,0 +1,1553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0,03/0 + 2,03/1 + 2,43/3 + 0,43/2 + -2,42/3 + -4,42/2 + -4,02/0 + -2,02/1 + -4,-40/2 + -2,-40/3 + 0,-41/2 + 2,-41/3 + 2,-81/1 + 0,-81/0 + -2,-80/1 + -4,-80/0 + +