使用大型地理编码数据集构建密度图?
我有一个包含超过 50,000 个地理编码点(经纬度)的数据集。 每个点都有一组与之相关的数据——例如质量、状态等。
我想制作一组密度图,显示这些指标的数据分布。 例如,一张地图将显示所有质量为“好”的项目的密度。
对于较小的点集,我会使用 Google 地图和自定义标记。 然而,在这里,不同的细分有数万个点
是否有任何 API 或库可以帮助我做到这一点?
我将采用的解决方案:将
- 要映射的区域分解为 网格。
- 计算条目数 落在每个方块内。
- 对于每个 正方形,生成一个 PNG 相对于数量的透明度 条目数。
- 填充 Google 地图 这组 PNG 作为标记。
I have a data set with over 50,000 geocoded points (lat-long). Each point has a set of data associated with it -- things like quality, status, etc.
I'd like to make a set of density maps showing the distribution of data by those metrics. For example, one map would show the density of all items with a quality of "good".
With a smaller set of points, I'd use Google Maps and custom markers. Here, however, different segments have tens of thousands of points
Are there any APIs or libraries that could help me do this?
The solution I will be going with:
- Break the area to be mapped into a
grid. - Count the number of entries
falling inside each square. - For each
square, generate a PNG with
transparency relative to the number
of entries. - Populate a Google Map with
this set of PNGs as markers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Google Fusion Table 在这方面做得很好 http://www.google.com/fusiontables/Home/< /a>
你的数据已经被地理编码了,这对你有好处,因为 - 根据我最近的经验 - Google 位置解析器不允许你处理不明确的位置..
Google Fusion Table does a nice job at it http://www.google.com/fusiontables/Home/
Good for you that your data are already geocoded, because -from my recent experience-, Google location resolver does not let you dealing with ambiguous location..
一种解决方案可能是使用密度图创建位图,并将它们(同时仅一个)添加为谷歌地图上的叠加层(使用
GGroundOverlay
),您可以查看 这篇文章给出了谷歌地图密度图的示例。 它使用 HeatMapAPI。 不幸的是,如果您将其与大量点一起使用,则该 API 不是免费的...
构建您自己的密度位图可能并不那么复杂...
另一种解决方案是减少可以使用的标记数量。 可以使用 MarkerClustered 库 来完成。 它不完全是密度图,但是......也许有用。
One solution could be to create bitmaps with your density maps and add them (only one at the same time) as overlay on your google map (with
GGroundOverlay
)You may have a look at this post that gives an example of density map with google map. It uses the HeatMapAPI. Unfortunately, this API is not free if you use it with a large number of points...
Put build your own density bitmap may be not so complicated...
One other solution is to reduce the number of markers you can use. It could be done with the MarkerClustered library. It is not exactly a density map, but... can maybe be useful.
http://heatmap.codeplex.com/
http://heatmap.codeplex.com/