使用产品:Supermap iObjects.NET 10.2.1
问题描述:调用NetworkBuilder.BuildNetwork方法构网得到三维网络书记DsPipenet,相对其建立空间索引,经过判断,该数据集支持重建空间索引,也支持R树索引,但是运行到建立索引的语句,程序就会报错中断(就是运行到bool b3= ***那一句出错)
请问为什么会出现这种问题,在桌面端这个数据集是可以正常建立R树索引的,但是组件开发就建立不了
if((DsPipeNet as DatasetVector).IsSpatialIndexDirty)
{
(DsPipeNet as DatasetVector).DropSpatialIndex();
DsPipeNet.Close();
if((DsPipeNet as DatasetVector).IsSpatialIndexTypeSupported(SpatialIndexType.RTree))
{
bool b3 = (DsPipeNet as DatasetVector).BuildSpatialIndex(SpatialIndexType.RTree);
}
}