ArcGIS desktop——“热力图”实现方法比较

本文探讨了如何使用ArcGIS的kriging插值、热点分析和密度分析来实现类似百度地图的热力图效果。尽管这三种工具在特定情况下能产生类似效果,但都无法直接满足动态缩放的热力图需求。ArcGIS pro的热点图符号系统通过核密度分析和动态聚合,可以更接近目标效果,并允许自定义渲染质量和色带设计。
摘要由CSDN通过智能技术生成

前几天接了一个电话,客户问我怎么才能用ArcGIS画出“百度地图热力图”中的那种炫酷的热力图,来反应采样点密集程度,而且当他进行缩放时热力图的形状也要能动态改变,就像下面左图、右图这样:

这里写图片描述

客户的需求是要在前端显示热力图,但是数据量非常大所以不愿意用前端API的方式实现。他说:“我查了很多资料,密度分析kriging插值热点分析三个工具我都试过了,但是哪个都不能做到我想要的效果,是我选择的方法错了,还是设置的参数不对呢?”

这样的问题我不是第一次听人说起,相信也绝不是最后一次。首先我先给出这个问题的答案:三种工具都不能做到!

下面容我卖个关子,我先分别介绍一下这三个工具,说说他们为什么不行,最后再说说怎么做才能实现这个需求。


一、 kriging插值

插值和“热力图”是最不沾边的一个工

  • 29
    点赞
  • 72
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
A year and a half year ago, I published this article to the Codeguru site and got a number of requests about the Kriging algorithm contour map. Unfortunately, my project was changed shortly after that article and later I quit the company so I couldn‘t find time to finish this Contour business. A week ago, I happened to need a contour map again so I decided to solve the Kriging algorithm. I searched the Internet for a commercial library but they all look ugly and hard to use. So, I made up my mind to make my own algorithm. The Kriging algorithm is easy to find, but this algorithm needs a Matrix and solver (LU-Decomposition). Again, I couldn‘t find suitable code for this. I tried to use GSL first but this made my code too big and was slower. Finally, I went back to "Numerical Recipe in C"—yes, that horrible-looking C code—and changed the code there to my taste.If you read this article before, the rendering part hasn‘t been changed much. I added the Kriging algorithm and revised the codes a little bit. Following is the Kriging Algorithm:templatedouble GetDistance(const ForwardIterator start, int i, int j){ return ::sqrt(::pow(((*(start+i)).x - (*(start+j)).x), 2) + ::pow(((*(start+i)).y - (*(start+j)).y), 2));}templatedouble GetDistance(double xpos, double ypos, const ForwardIterator start, int i){ return ::sqrt(::pow(((*(start+i)).x - xpos), 2) + ::pow(((*(start+i)).y - ypos), 2));}templateclass TKriging : public TInterpolater{public: TKriging(const ForwardIterator first, const ForwardIterator last, double dSemivariance) : m_dSemivariance(dSemivariance) { m_nSize = 0; ForwardIterator start = first; while(start != last) { ++m_nSize; ++start; } m_matA.SetDimension(m_nSize, m_nSize); for(int j=0; j<m_nSize; j++) { for(int i=0; i<m_nSize; i++) { if(i == m_nSize-1 || j == m_nSize-1) { m_matA(i, j) = 1; if(i == m_nSize-1 && j == m_nSize-1) m_matA(i, j) = 0; continue; } m
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值