报错"the geometry has no Z values"处理

简介:

// <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




本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/4311376.html,如需转载请自行联系原作者

相关文章
|
6月前
|
算法 C# C++
Undefined gray values in operator intensity
Undefined gray values in operator intensity
|
8天前
【echarts报错】line series not exists,should be same with series name or data name
【echarts报错】line series not exists,should be same with series name or data name
|
8月前
|
存储 缓存 数据可视化
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处(上)
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处
2156 0
成功解决A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,co
成功解决A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,co
|
8月前
|
存储 JSON 数据可视化
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处(下)
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处
550 0
|
8月前
|
存储 NoSQL UED
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处(中)
(七)解析Streamlit的数据元素:探索st.dataframe、st.data_editor、st.column_config、st.table、st.metric和st.json的神奇之处
540 0
|
10月前
|
存储 安全 关系型数据库
Column length too big for column ‘remark‘ (max=65535)解决办法
Column length too big for column ‘remark‘ (max=65535)解决办法
129 0
|
10月前
|
SQL 关系型数据库 MySQL
near ‘order values(‘1‘,‘1‘,‘100‘,‘10.25‘)‘ at line 1
near ‘order values(‘1‘,‘1‘,‘100‘,‘10.25‘)‘ at line 1
60 0
|
XML SQL Oracle
通过wm_concat 函数报错:ora06502-character string buffer to small浅谈wm_concat、Listagg、xmlagg函数的使用和结果不确定性
wm_concat、Listagg、XMLAGG ora06502-character string buffer to small varchar2类型最多支持4000字符(如果是中文会更短到2000) 那无论是wm_concat函数还是listagg函数,在处理超过4000字符(如果是中文会更短到2000)长度的时候都会报错,提供(xmlagg(xmlparse(content 合并字段||&#39;,&#39; wellformed) order by 排序字段).getclobval() )给大家使用来解决此问题!
通过wm_concat 函数报错:ora06502-character string buffer to small浅谈wm_concat、Listagg、xmlagg函数的使用和结果不确定性
The Double Linknode for Linear table | Data
The some code in Data book (5th Edition) from the 54 page to 55 page
57 0