Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn t work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
In order to calculate the nearest locations that are represented by latitude/longitude, I was considering dividing the map into small grids, approximately 100x100 meter grids. Essentially each point would be assigned to a grid.
I understand that I could instead also use spatial indexes with MySQL etc, but am planning to use a non-relational database like Cassandra where it would be difficult to do indexing on spatial objects, and so some kind of grid approximation technique could be neat.
What would be the best way of creating such a grid system and mapping the 2-D spatial locations to it?
Edit1: It might be alright if the grids are not perfectly uniform, more so around the poles.