报错"the geometry has no Z values"处理
from:http://blog.sina.com.cn/s/blog_6faf711d010138vq.html
// <summary>/// 设置Z值和M值,解决The Geometry has no Z values错误
///</summary>///<param name="pF">要素</param>///<param name="pGeo">几何</param>publicstaticvoid 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
//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;
}
}//function
相关文章
- CentOS环境下,root修改文件权限时,报错:chmod: changing permissions of ‘cadvisor’: Operation not permitted问题的处理策略
- 线性空间下,如何处理GrabTexture显示过亮的情况?
- C#编译器优化那点事 c# 如果一个对象的值为null,那么它调用扩展方法时为甚么不报错 webAPI 控制器(Controller)太多怎么办? .NET MVC项目设置包含Areas中的页面为默认启动页 (五)Net Core使用静态文件 学习ASP.NET Core Razor 编程系列八——并发处理
- 【ORACLE】ORA-27102: out of memory报错的处理
- SQL Developer 连接 oracle数据库 报错 Io 异常 The Network Adapter could not establish the connection的三种解决方法
- ionic2项目创建回顾 及 react-native 报错处理
- [转]html页面调用js文件里的函数报错onclick is not defined处理方法
- 如何处理App Linking uri trustlist相关报错
- swift的异常处理:本质是错误信息的传递方式
- Dynamic CRM 2013学习笔记(三十三)自定义审批流4 - 规则节点 -有分支的流程处理
- SptingBoot报错处理:required a bean of type 'XXX' that could not be found、@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})注解作用、@Mapper和@Repository注解的区别
- 后台常见报错处理和注意问题(二)
- 如何处理App Linking uri trustlist相关报错
- 揭秘Facebook北极圈数据中心:降温效果杠杠的,日处理100亿条信息
- Git 之 如何递归下载工程,以及递归下载中 OpenSSL SSL_read: Connection was reset, errno 10054 的报错处理
- ASP.NET Aries 入门开发教程6:列表数据表格的格式化处理及行内编辑
- c# 并行计算(大量循环处理的场景下)
- 圣诞特辑-解决idea新建报错The required Java version 11 is not supported by the project SDK 1.8.
- Java程序报错后跳过继续执行_Java异常处理