Questions tagged «pysal»

1
来自Numpy阵列的PySAL自然休息
我正在尝试使用Python从栅格中提取自然中断值。 预期的过程进行如下:将Arcpy栅格对象转换为NumPy Array(使用RasterToNumPyArray)以自然中断值(使用PySAL Natural Breaks函数)。 import arcpy, pysal from pysal.esda.mapclassify import Natural_Breaks as nb # code to create greenIndex arcpy Raster object here greenArray = arcpy.RasterToNumPyArray(greenIndex) breaks = nb(greenArray,k=2,initial=20) 该代码返回错误“ ValueError:矩阵必须为二维”。 据我所知,greenArray是一个二维数组。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.