1. A method of implementing a perfect multidimensional hash function to densely pack sparse spatial data, the method comprising: creating a hash table based at least in part on a data source comprising sparse multidimensional data; creating an offset table based at least in part on the hash table; and applying a perfect hash function to map the sparse multidimensional data into the hash table using the offset table.