首页 / 浏览问题 / 组件GIS / 问题详情
大数据下的密度分析
13EXP 2020年07月06日

1.矢量分析,直接使用矢量的密度分析,分析保存为UDB的结果的话,输出结果为0,使用Desktop栅格分析的密度是有结果的,代码分析就没有。

下图是用Desktop做的

2. 使用栅格的密度分析的话,报空指针的异常

如上面的图的话,该怎么处理???矢量的密度分析按照官方文档进行代码编写,可以执行,但是没有结果。

使用栅格的分析方法的话报空指针,问题又出在哪里?

1个回答

空指针异常是DensityAnalyst执行时抛出来的,检查apply方法里的每个参数的构造是否正确,打印每个参数,另外单位用度与实际数据情况是否符合。
1,560EXP 2020年07月07日

还是不可以,打印了所有参数都没有问题,换成Meter,Kilometer等都不行,还是报空指针,矢量的也计算不出结果。下面的是部分数据,您能帮我写个能正常出结果的DEMO吗?先谢谢了

经度,纬度
114.2897833,31.17156901
114.4008734,31.1685023
114.4326877,31.17164518
114.2984271,31.25769982
114.3864836,31.25662716
114.4293819,31.31069925
114.4310919,31.31234576
114.2599722,31.30207163
114.2686603,31.301659
114.330613,31.29665556
114.4208442,31.29653798
114.2931673,31.29054325
114.2928646,31.29042274
114.2931693,31.29051226
114.2930325,31.28950886
114.2926328,31.29155762
114.2928826,31.29038773
114.2938469,31.28717859
114.2921482,31.29294577
114.2931713,31.29054524
114.2931893,31.29043726
114.390585,31.2883626
114.2464876,31.25396117
114.3969605,31.25397856
114.3971006,31.25391356
114.2839611,31.24227189
114.3528801,31.2201557
114.3684773,31.22038626
114.3645416,31.21870435
114.36716,31.21654878
114.3686904,31.21701056
114.3685665,31.21763243
114.2287994,31.27593997
114.2682795,31.27755185
114.2749053,31.28002348
114.3676735,31.21666404
114.3672489,31.21630377
114.3635689,31.21571112
114.3649431,31.21908361
114.3746453,31.21706444
114.2707626,31.21374016
114.3609037,31.20839847
114.3653611,31.21453316
114.3925692,31.19613862
114.4158054,31.19887223
114.4186029,31.19833534
114.4020242,31.27716713
114.2796406,31.18019415
114.1293794,30.33866331
114.1260146,30.33680173
114.1312836,30.3375998
114.1312175,30.33714178
114.130959,30.33720945
114.1468762,30.34153402
114.1428077,30.34199045
114.1431855,30.34300689
114.1859877,30.34511584
114.1860138,30.34473394
114.2517888,30.33769376
114.2795308,30.33759035
114.2796237,30.33768624
114.2822518,30.3405109
114.2990989,30.34411397


...