The Geometry has no Z values 解决办法
来源:互联网 发布:game.min.js 编辑:程序博客网 时间:2024/06/06 07:47
在创建要素时,简单的IFeatureClass.CreateFeature之后,然后把IGeometry对象赋给Feature.shape,会引发“The Geometry has no Z values”的错误提示。类似的错误在做地图标注过程中也会出现。
/// <summary> /// 设置Z值和M值,解决The Geometry has no Z values错误 /// </summary> /// <param name="pF">要素</param> /// <param name="pGeo">几何</param> public static void SetZValue(IFeature pF, IGeometry pGeo) { int index; index = pF.Fields.FindField("Shape"); IGeometryDef pGeometryDef; pGeometryDef = pF.Fields.get_Field(index).GeometryDef as IGeometryDef; if (pGeometryDef.HasZ) { IZAware pZAware = (IZAware)pGeo; pZAware.ZAware = true; //IZ iz1 = (IZ)pGeo; //iz1.SetConstantZ(0); //将Z值设置为0 //在ArcEngine10.2中用下面的两行代码来设置 IPoint point = (IPoint)pGeo; point.Z = 0; } else { IZAware pZAware = (IZAware)pGeo; pZAware.ZAware = false; } //M值 if (pGeometryDef.HasM) { IMAware pMAware = (IMAware)pGeo; pMAware.MAware = true; } else { IMAware pMAware = (IMAware)pGeo; pMAware.MAware = false; } }
阅读全文
0 0
- The Geometry has no Z values 解决办法
- The Geometry has no Z values 解决办法
- Geometry cannot have Z values /the geometry has no z values的问题
- 关于Engine中the geometry has no z values的问题
- Engine中如何把没有Z值的Gemetry转为有Z值的Geomtry:报错"the geometry has no Z values"
- Geometry cannot have Z values
- Geometry cannot have Z values
- Geometry cannot have Z values.
- The geometry is not z-aware
- AttributeError: Values instance has no attribute 'settings'
- 'numpy.ndarray' object has no attribute 'values'
- the project file '' has been renamed or is no longer in the solution 解决办法
- the object has no symbol
- ‘dict’ object has no attribute 'has_key'解决办法
- class viewController has no initializers解决办法
- class viewController has no initializers解决办法
- class viewController has no initializers解决办法
- error: the destination has no channels defined
- 杂记——搜索按钮的小效果
- 安装CDH组件的时候会多产生一个分组的原因
- lintcode刷题——丢失的第一个正整数
- Java 中正确使用 hashCode 和 equals 方法
- kmp算法 java实现
- The Geometry has no Z values 解决办法
- 文章标题
- springAop 运用之权限验证
- java发送邮件(javaMail通过SMTP发送邮件)
- javascript内置对象常用属性和方法(笔记一)
- 【终极面试】线程向
- 部分库函数源码
- linq去重
- VS项目属性的一些配置项的总结(important)