Spatial index on hive Spatial index on hive hadoop hadoop

Spatial index on hive


There are also k-dimensional tree for spatial data, it's should me much simpler to operate with.


I've only seen examples of partitions with dates. A tyle 2012, 2013 .... etc. These are really discrete values. I do not know if you can define a partition with ranges for example: y in [40.1, 42.4), and x in [-4,0), another patition y in [42.4, 43), and x in [-4,0) .. . etc. Partitions do not have statics ranges, because there will be space areas which do not have much information. It's a way to make a Quadtree http://en.wikipedia.org/wiki/Quadtree , but associated with the partitions, without index. I think it would work as an spatial index, will works in hive, and maybe a elegant way.

This is my idea. I hope someone finds a way to make the partitions as well, and most importantly is that x and y are variables that determine the partition to check, or an elegant alternative

This is a example to make partitions

CREATE TABLE sales ( sales_order_id BIGINT, order_amount FLOAT, order_date STRING, due_date STRING, customer_id BIGINT)PARTITIONED BY (country STRING, year INT, month INT, day INT) ;