Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example disk-based storage of a QuadTree index. The index is built from the raw data in `data.csv`, resulting in the index txt files you see below. The index files contain pointers to their child nodes as well as a reference to the file and line number of the record. In this example, each node has a capacity of 4 data points.
nw:
ne:
sw:
se:
data.csv#5
nw:-90,45,180,90.txt
ne:90,45,180,90.txt
sw:-90,-45,180,90.txt
se:90,-45,180,90.txt
data.csv#1
data.csv#2
data.csv#3
data.csv#4
Portland United States 45.52345 -122.67621
Beaverton United States 45.48706 -122.80371
Eugene United States 44.05207 -123.08675
Milwaukie United States 45.44623 -122.63926
Hillsboro United States 45.52289 -122.98983
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment