Skip to content

Instantly share code, notes, and snippets.

@chinasaur
chinasaur / README.md
Last active August 29, 2015 14:16 — forked from jaredwinick/README.md
Z-Order Curve with Query... now in BLUE!

Copied from jaredwinick's gist to replace red with blue. Makes the visualization friendly for protanopic viewers (strong red colorblindness, about 1% of the male population).

Z-Order curves are used to encode multiple dimensions to one dimension while maintaining locality. This feature makes them useful for indexing multidimensional data such as geospatial data. In BigTable-like systems (Accumulo, HBase, Cassandra a z-order curve index can translate a bounding box query to a single range scan. As this example shows, sometimes the locality properties of the curve are very good and few points outside the bounding box are scanned. Other times though, many points outside the bounding box are scanned if using a single range.

This example was inspired by Mike Bostock's Quadtree example