Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: Quadtrees?
> [Discussion of "B-tree with space-filling curve to index the tree"]
>
> Ahm, you've totally lost me here! I know what B-trees are (did one for
> a database system I wrote), and I've heard of space-filling curves, but
> I can't imagine how a curve can be used to index things. Can you say
> some more about this?
Lessee... if it's a curve, then there is a function that generates it. For
the Morton curve we'll call that function M(x,y). The range and domain of M
are both the set of Integers (i.e. the function is not continuous, but is
defined for all integral values of x and y). So, if we generate values of
M(x,y) for all values of x and y, the result is a series of integers. In
this case it's called the Morton series.
What I'm getting at is that the set of integer x and y is an infinite,
dense matrix of equidistant points in 2 dimensional space. For each of
these points there exists a unique value in the Morton series. This value
is derived by interleaving the bits of the x and y coordinates as described
in previous mail.
So.. now we want to index a collection of points in 2 dimensional space
(btw, it all works in any number of dimensions you want). Any index
(B-Trees included) requires that we have some key for each datum we index.
For simplicity's sake, we'll say that the key must have >, <, and ==
defined for it. Now, if you wanted to, you could store off both the x and y
from your points and derive >, <, and == operators that compared the
tuples. Equality is pretty easy, but greater than and less than get a
little funky.. is [2,3] greater than or less than [3,2]? But wait! For any
point (x,y) there exists some value in the morton series M(x,y). M(x,y) is
just an integer and >, <, == are all trivially defined for integers. In
short, you use the morton codes for the points to sort the points in your
index.
You don't have to use a B-Tree.. anything will do, but the B-Tree is
attractive for large data sets used with limited core space. Next mail
shows how to do a linear quadtree.
-Todd
- Thread context:
- Re: Quadtrees?, (continued)
- Re: Quadtrees?,
S001GMU S001GMU#nova,wright.edu, Sat 01 Mar 1997, 04:11 GMT
- Re: Quadtrees?,
Carter T Shock ctso#umiacs,umd.edu, Sat 01 Mar 1997, 05:12 GMT
- Re: Quadtrees?,
S001GMU S001GMU#nova,wright.edu, Sat 01 Mar 1997, 05:38 GMT
- Re: Quadtrees?,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 01 Mar 1997, 17:34 GMT
- Re: Quadtrees?,
Carter T Shock ctso#umiacs,umd.edu, Sun 02 Mar 1997, 21:41 GMT
- Re: Quadtrees?,
coder coder#ibm,net, Mon 03 Mar 1997, 03:26 GMT
- Re: Quadtrees?,
coder coder#ibm,net, Tue 04 Mar 1997, 14:53 GMT
- Just a bit of musing,
Nathan Yospe yospe#hawaii,edu, Thu 27 Feb 1997, 08:49 GMT
[ Other Periods
| Other mailing lists
| Search
]