geometry-ArcEngine中拷贝feature时候报错

问题描述

ArcEngine中拷贝feature时候报错
  public static void MyInsertFeature(IFeatureClass pFeatureClass IGeometry pGeometry)    {        IFeatureBuffer pFeatureBuffer=null;        int typeFieldIndex = pFeatureClass.FindField(""Layer"");        pFeatureBuffer = pFeatureClass.CreateFeatureBuffer();        IFeatureCursor insertCursor = pFeatureClass.Insert(true);        pFeatureBuffer.set_Value(typeFieldIndexZBTZ"");               pFeatureBuffer.Shape = pGeometry;        insertCursor.InsertFeature(pFeatureBuffer);    }

程序调试时,每次到 pFeatureBuffer.Shape = pGeometry;这里就报错“这个集合中找不到此项目。”,pGeometry明明不是null啊.求高手解答啊。困扰好久了。很郁闷。

解决方案

找到原因了!!!原来是数据类型不匹配,所以不能赋值。
在featureclass定义的时候应该加上geometryDefEdit.HasZ_2 = true;
不然无法将3d数据强行赋给2d的

时间: 2024-08-30 03:25:02

geometry-ArcEngine中拷贝feature时候报错的相关文章

char[]-关于c++中char[ ] 的赋值报错问题

问题描述 关于c++中char[ ] 的赋值报错问题 iemi = pThis->imei; 第一个imei是typedef struct ServerInfoData { char iemi[128]; }ServerInfoData; 第二个imei是在头文件中被定义的private 中的char[128]; 但是在编译的时候就报错 ./Core/ServerManager.cpp:145:32: error: invalid array assignment 这是怎么回事啊 解决方案 楼主

Windows 8应用商店中安装软件出现报错:0x80070585

  故障现象: Windows 8应用商店中安装软件出现报错:0x80070585 解决方案: 1. 重新启动电脑; 2. 按ctrl+alt+delete组合键调出任务管理器; 3. 停止WMPNetworkSvc服务; 4. 重新安装刚才无法运行的软件.

jboss-JBOSS4 在运行过程中突然不停地报错DLQ not bound是什么原因?

问题描述 JBOSS4 在运行过程中突然不停地报错DLQ not bound是什么原因? JBOSS4 在运行过程中突然不停地循环报错DLQ not bound,但是运行系统连接JBOSS还是正常的,而且业务也能正常执行,请问这个是什么原因导致的呢?怎么预防和停止报错?

java-myeclipse中Java导出项目报错

问题描述 myeclipse中Java导出项目报错 解决方案 出现这个问题是因为编译的时候编码跟文件存储的编码方式不一样造成的,你可以参考下这篇blog,希望对你有帮助. 解决方案二: 那你看下这个问题和答案,也许可能有你需要的 解决方案三: 刚刚那个忘插入链接了

android-在安卓studio中运行项目总是报错,有人知道怎么解决吗?

问题描述 在安卓studio中运行项目总是报错,有人知道怎么解决吗? Error:A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find any version that matches com.android.support:appcompat-v7:23.+. Searched

tring format报错-在myEclipse9.0中运行String.format报错

问题描述 在myEclipse9.0中运行String.format报错 错误信息:The method format(String, Object[]) in the type String is not applicable for the arguments (String, String) 源代码: public void test1(){ String str=null; str=String.format("Hi, %s", "林计钦"); // 格式化

ios-iOS rootViewController中移除KVO报错

问题描述 iOS rootViewController中移除KVO报错 在rootViewController中写了一个KVO ,在dealloc中移除观察者. 程序重新运行的时候报错,由于先执行dealloc 后执行viewDidLoad,移除观察者报错.目前想到的方法是[self isViewLoaded]判断下是否执行了viewDidLoad.有没有其他好的解决方法 解决方案 http://www.cocoachina.com/bbs/read.php?tid=457872 解决方案二:

cocos2d x-在Xcode中安装cocos2d-x老报错求大神指教

问题描述 在Xcode中安装cocos2d-x老报错求大神指教 taorenwangtekiMacBook-Pro:~ taorenwang$ cd /Users/taorenwang/Desktop taorenwangtekiMacBook-Pro:Desktop taorenwang$ cd cocos2d-2.1rc0-x-2.1.3/ taorenwangtekiMacBook-Pro:cocos2d-2.1rc0-x-2.1.3 taorenwang$ ./install-templ

c++的问题-vector中使用类编译报错,求各位c++大神解答

问题描述 vector中使用类编译报错,求各位c++大神解答 std::vectora其中A是自己写的一个类,运行后编译出错提示A类没有复制构造函数或者复制构造函数声明为'explicit'.可是在类中我写了复制构造函数了.求各位c++大神解答 解决方案 类A除了复制构造函数,还要实现operator = 解决方案二: A::A(const A& aa){}确定没有写错?