几何不能具有Z值
ArcEngine 复制要素Geometry时,产生 几何不能具有Z值 的异常
解决方法:http://forums.esri.com/Thread.asp?c=159&f=1707&t=275474
参考上述帖子。将Geometry中的Z值丢掉即可。
代码如下:
IFeatureBuffer pNewFeatureBuffer = pNewFtCls.CreateFeatureBuffer(); //要素属性复制 IGeometry pGeom = pOldFeature.Shape; IZAware pZaware = pGeom as IZAware; pZaware.DropZs(); pZaware.ZAware = false; pNewFeatureBuffer.Shape = pGeom;