空间索引网格大小无效的解决方法The spatial index grid size is invalid
之前在做shp数据导入Geodatabase中时,程序运行出现错误提示:“The spatial index grid size is invalid”。
后来查阅esri帮助找到了原因。是LoadOnlyMode的问题。记下来,以后好好研究。
http://support.esri.com/en/knowledgebase/techarticles/detail/35007
Error: The spatial index grid size is invalid
| Article ID: | 35007 |
|---|---|
| Software: | ArcGIS - ArcEditor 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcView 9.2, 9.3, 9.3.1, 10 |
| Platforms: | N/A |
Error Message
"FDO_E_INVALID_GRID_SIZE
-2147216894
The spatial index grid size is invalid."
Cause
Solution or Workaround
- If this error is encountered while editing within ArcMap, recalculate or modify the grid size of the feature class to accommodate the new feature. The recalculation of the grid size must be done from the Feature Class properties dialog box within ArcCatalog. This requires the use of the Stop Editing function, save any edits, and close the Map Document containing the feature class. For steps on how to recalculate or modify the grid size of a feature class, see the following Web help documentation: Setting spatial indexes.
- If this error is being encountered programmatically through the ArcObjects API, notifying the user to manually modify the spatial index is not an ideal solution. Instead, this error can be prevented by placing the feature class into LoadOnly mode prior to inserting the feature. When the feature class is taken out of LoadOnly mode, the Geodatabase automatically recalculates an appropriate grid size. The following code sample demonstrates how to use LoadOnly mode with a feature class:
'Place the feature class in loadonly mode. This steps needs to happen prior to calling IFeature.Store or IFeatureCuror.InsertCursor
Dim pFCLoad As IFeatureClassLoad
Set pFCLoad = pFeatureClass
pFCLoad.LoadOnlyMode = True 'Create feature buffer
Dim pFeatBuffer As IFeatureBuffer
Set pFeatBuffer = pFeatureClass.CreateFeatureBuffer
Set pFeatBuffer.Shape = pGeometry 'Create insert cursor and insert buffer
Dim pCursor As IFeatureCursor
Set pCursor = pFeatureClass.Insert(True) 'Insert the feature and call flush
pCursor.InsertFeature pFeatBuffer
pCursor.Flush 'Take the feature class out of loadonly mode, the Geodatabase will calculcate an appropriate grid size based on the features within the feature class
pFCLoad.LoadOnlyMode = False
空间索引网格大小无效的解决方法The spatial index grid size is invalid的更多相关文章
- 设置height:100%无效的解决方法
设置height:100%无效的解决方法 刚接触网页排版的新手,常出现这种情况:设置table和div的高height="100%"无效,使用CSS来设置height:" ...
- WPF:指定的命名连接在配置中找不到、非计划用于 EntityClient 提供程序或者无效的解决方法
文/嶽永鹏 WPF 数据绑定中绑定到ENTITY,如果把数据文件做成一个类库,在UI文件中去应用它,可能遇到下面这种情况. 指定的命名连接在配置中找不到.非计划用于 EntityClient 提供程序 ...
- 移动端bug~~移动端:active伪类无效的解决方法【移动端 :active样式无效】
移动端:active伪类无效的解决方法[移动端 :active样式无效]2016-09-26 15:46:50 问题: 移动端开发的时候实现按钮的点击样式变化,但是在iphone[safiri Mo ...
- js中style.display=""无效的解决方法
本文实例讲述了js中style.display=""无效的解决方法.分享给大家供大家参考.具体解决方法如下: 一.问题描述: 在js中我们有时想动态的控制一个div显示或隐藏或更多 ...
- redhat linux enterprise 5 输入ifconfig无效的解决方法
redhat linux enterprise 5 输入ifconfig无效的解决方法 在安装完成linux后,进入终端,输入命令行ifconfig,会提示bash: ifconfig: comm ...
- 排错-安装SQl 2008“为SQL Server代理服务提供的凭据无效的解决方法
安装SQl 2008“为SQL Server代理服务提供的凭据无效的解决方法 by:授客 QQ:1033553122 在Windows Server 2008安装SQL Server 2008出现的问 ...
- Node.js中针对中文的查找和替换无效的解决方法
Node.js中针对中文的查找和替换无效的解决方法. //tags的值: tag,测试,帖子 var pos1 = tags.indexOf("测"); //这里返回-1 ta ...
- QWidget子窗口中setStyleSheet无效,解决方法
继承 QWidget setStyleSheet无效,解决方法. 发现 继承自QWidget的自定义类 ,使用setStyleSheet无效, 如果删除头文件中的 Q_OBJECT,setStyleS ...
- 表格Table宽度设置无效的解决方法
表格Table宽度设置无效的解决方法 bootstrap中使用table时发现不管用width赋值方式都无法改变table>td的宽度 解决方法: 设置table:table-layout:fi ...
随机推荐
- a:hover伪类在ios移动端浏览器内无效的解决方法
a:hover 设置的样式在ios系统的浏览器内显示不出来,看来在iOS系统的移动设备中,需要在按钮元素或body/html上绑定一个touchstart事件才能激活:active状态. 方法 一: ...
- JavaScript学习之事件原理和实践
1 基本概念 1.1 事件 JavaScript与HTML之间的交互是通过事件实现的. 事件是文档或浏览器窗口中发生的一些特定的交互瞬间,在事件上可以注册处理程序,以便当事件发生时,处理程序中的代码得 ...
- loadrunner测试ajax框架
loadrunner测试ajax框架的系统时,录制回放都没有报错,但是回放后系统中没有产生数据,解决方法 loadrunnerajax框架测试脚本headerajax [问题描述]用loadrunne ...
- lr回放Warning -26601报错的解决方法
问题现象: Action2.c(30): Error -26601: Decompression function (wgzMemDecompressBuffer) failed, return c ...
- centOS7.0配置防火墙
之前用的iptables来管理的防火墙,后来发现centOS7.0中已经用firewalld取代iptables了,于是与时俱进,停用了iptables. systemctl stop iptable ...
- shell-grep命令详解(转)
(转自http://blog.csdn.net/onlyou930/article/details/6582409) 用‘grep’搜索文本文件如果您要在几个文本文件中查找一字符串,可以使用‘grep ...
- 面试的65个回答技巧-适用于BAT公司
互联网职业群分享的资料,里面大多是BAT公司的人,很多是猎头.这些技巧对于职场人来说,是非常宝贵的. 1.请你自我介绍一下你自己? 回答提示:一般人回答这个问题过于平常,只说姓名.年龄.爱好.工作经验 ...
- 洛谷P1291 [SHOI2002]百事世界杯之旅 [数学期望]
题目传送门 百事世界杯之旅 题目描述 “……在2002年6月之前购买的百事任何饮料的瓶盖上都会有一个百事球星的名字.只要凑齐所有百事球星的名字,就可参加百事世界杯之旅的抽奖活动,获得球星背包,随声听, ...
- 如果修改GeneXus Android的一些源码文件(FlexibleClient)
在使用GeneXus开发Android应用的过程中遇到了一个问题,使用tabs控件时发现默认高度过高,和UI设计要求的高度不一致,找了很久发现没有地方设置.后来联系了GeneXus中国厂商,得到了答复 ...
- 【Java】SpringBoot入门学习及基本使用
SpringBoot入门及基本使用 SpringBoot的介绍我就不多说了,核心的就是"约定大于配置",接下来直接上干货吧! 本文的实例: github-LPCloud,欢迎sta ...