您的位置:首页 > 产品设计 > UI/UE

【转】Geometry cannot have Z values

2015-06-05 08:45 169 查看
http://blog.csdn.net/tweeenty/article/details/44246407

在对矢量要素类添加要素,进行赋几何信息时(FeatureBuffer.Shape = IGeometry)可能会报Geometry cannot have Z values 的错误,原因是赋值的IGeometry的属性值 IZAware.ZAware=true的,所以在进行赋值导致信息的不匹配,出现错误;

在赋值时进行修正:

IGeometry ipGeometry = ipFeature.ShapeCopy;
IZAware ipZAware = ipGeometry as IZAware;
if (ipZAware.ZAware == true)
{
ipZAware.ZAware = false;
}
ipFeatureBuffer.Shape = ipGeometry;


注:如果矢量要素类具有Z Coordinate System,在处理数据时,速度会受到很大的影响;我们可能通过GP工具中的Environments中的ZValues的选项来删除掉矢量要素类的这个属性
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: