我有几百万(10+)标记,各家有各家的领域:
1. lat
2. lng
3. area (double)
4. size (int)
5. tolerance (double)
6. lags (boolean)
7. channel (boolean)
... (more)
现在,我想每个集群有以下汇总数据:
1. number of markers
2. min area
3. max area
4. avg area
5. min size
6. max size
7. avg size
8. tolerance distribution (how many where of tolerance < X, other >=X < Y and >=Y <Z where X,Y,Z constants)
... (more)
集群是基于标记的lat,lng(距离明智)和基于缩放级别(int)创建的。
非问题的一部分(**):
计算所有缩放级别集群,无论 条件“全”的。这是通过创建树来完成的,并且为用户提取集群非常简单。
现在的问题:
用户可以根据标记字段查询,e.g“显示我的所有标记 其面积> K和滞后=真”。仅针对此查询,需要创建一个整体 新群集树。如果他更改查询“显示 我所有标记,他们的区域> K.0001和滞后=真”,并且新树 将不得不被创建。我不想为每个用户的查询计算这样的树 ,而不是将它存储在内存中(不知道它是否可能是 )。
问:
What approach should be taken ?
given the complexity of calculation X # of markers
(fields inside) X speed factor.
I was thinking that there's some sort of way to use the
"all-in" clusters calculation(**), as it gives me ALL the markers and clusters and from
there to manipulate in some elegant way.
请问:
- space-filling-curve (hilbert) can help? how?
- DB approach (what DBand why?)
- k-d tree ?
的整体思路是处理大量的数据和计算预切换,以便用户可以与出操纵它计算它在他身边或服务器端(因此客户端群集不是解决方案,融合表也是如此)
代码示例更多比欢迎
谢谢。
我认为很难在Hadoop MapReduce中管理所有你想要的东西。因此,对于您的数据库方法,请阅读以下内容:http://www.directionsmag.com/articles/nosql-databases-what-geospatial-users-need-to-know/164635 – 2012-07-31 09:55:01