cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mason Hale <>
Subject How to model 2D data in Cassandra?
Date Sat, 17 Apr 2010 12:31:24 GMT
On Saturday, April 17, 2010, philip andrew <> wrote:
> Hi,
> Lets say I wanted to store 2 dimensional data in the database, each object has a X and
Y location in a very large space.
> I want to query Cassandra for all objects within a rectangle.

You should look into Geohash (
or one of the similar alternatives. They map geographic coordinates to
lexigraphically sortable identifiers which can be used to find all
entities in a geographic region or to test whether two entities are in
the same region by comparing a single key per entity. No geometry
calulations required. ;-)

This page provides a good description of the technique:



Mason Hale
direct +1 800.618.0768 ext 701

View raw message