Geospatial clustering

612 views
Skip to first unread message

Павел Климашкин

unread,
Jan 13, 2013, 10:05:57 AM1/13/13
to mongod...@googlegroups.com
Hello! I have hundreds of thousands objects on map. And select from base almost all of them (within map container rectangle on a small scale) is very bad practice. Need clustering inside DB.
In a relational database is often used additional table - cluster, which is selected first.
Is there some best practice for geospatial clustering inside MongoDB? Google says nothing.

andy

unread,
Jan 17, 2013, 1:00:19 AM1/17/13
to mongod...@googlegroups.com
Are you maybe looking for something like the Haystack indexes: http://docs.mongodb.org/manual/core/geospatial-indexes/#geospatial-indexes-haystack-index

Another option might be to geohash (http://en.wikipedia.org/wiki/Geohash) your coordinates at a certain 'resolution', so that points near each other have the same/similar hash. Then you could shard on that hash key as well, or do other fancy stuff depending on your use case/application.

andy
Reply all
Reply to author
Forward
0 new messages