dem2terrain icon indicating copy to clipboard operation
dem2terrain copied to clipboard

切片时出错,提示TypeError: Cannot read properties of undefined (reading 'length')

Open hc27080401 opened this issue 1 year ago • 1 comments

具体错误如下图: 切片出错

hc27080401 avatar Aug 22 '24 04:08 hc27080401

需要提供测试样例数据

FreeGIS avatar Aug 30 '24 07:08 FreeGIS

forEachHeightBuffer(heightBuffer, encode)时heightBuffer未定义。当前2.2.7版本支持以下数据类型: if (dataType === 'Int8' || dataType == gdal.GDT_Byte) { heightBuffer = new Uint8Array(writeinfo.wxsize * writeinfo.wysize); dataType = gdal.GDT_Byte; } else if (dataType === gdal.GDT_Int16) heightBuffer = new Int16Array(writeinfo.wxsize * writeinfo.wysize); else if (dataType === gdal.GDT_Float32) heightBuffer = new Float32Array(writeinfo.wxsize * writeinfo.wysize);,如果dem的类型不是如下判断,将为空对象。

FreeGIS avatar Jul 25 '25 06:07 FreeGIS