ArcCatalog加载ArcSDE数据报:ERROR 000372: Spatial Reference for output is invalid, Please update to allow

标签: referenceoutputinsertinputnull存储
4707人阅读 评论(0) 收藏 举报
分类:

最近有一用户咨询,他们的数据老是导入不到ArcSDE中,数据源为Filegeodatabase里面的要素类,不管是import还是Copy/paste都出错。

具体情况描述:用户的一个服务器A里面的ArcSDE的某个要素类层,用户使用桌面将A数据库里面的某个要素类导出到FileGeodatabase,然后在将该FGDB导入到另外一个服务器B,就出现了相关的问题:ERROR 000372: Spatial Reference for output is invalid, Please update to allow 

用户将数据发过来,我直接将数据加载到ArcMap中,提示如下对话框


然后将这个数据,通过Import的方式导入到数据库中提示如下错误

Executing: FeatureClassToFeatureClass LZ_FH_YT_PL "Database Connections\Connection to 192.168.220.165.sde" LZ_FH_YT_PL # "TFH "TFH" true true false 20 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,TFH,-1,-1;QH "QH" true true false 20 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,QH,-1,-1;ZH "ZH" true true false 20 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,ZH,-1,-1;SZC "SZC" true true false 20 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,SZC,-1,-1;FJH "FJH" true true false 30 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,FJH,-1,-1;GLSJ "GLSJ" true true false 14 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,GLSJ,-1,-1;QXLX "QXLX" true true false 2 Short 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,QXLX,-1,-1;QXK "QXK" true true false 8 Double 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,QXK,-1,-1;DYH "DYH" true true false 5 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,DYH,-1,-1;HH "HH" true true false 5 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,HH,-1,-1;FJHCK "FJHCK" true true false 50 Text 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,FJHCK,-1,-1;YTLX "YTLX" true true false 2 Short 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,YTLX,-1,-1;CLLX "CLLX" true true false 2 Short 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,CLLX,-1,-1;Shape_Length "Shape_Length" false true true 8 Double 0 0 ,First,#,D:\data\test.gdb\test.gdb\LZ_FH_YT_PL,Shape_Length,-1,-1" #
Start Time: Thu Mar 22 15:14:55 2012
WARNING 000597: Failed to insert input record with FeatureID 709841.
WARNING 000595: C:\Users\ADMINI~1\AppData\Local\Temp\LZ_FH_YT_PL0.fid contains the full list of features not able to be copied.
WARNING 000597: Failed to insert input record with FeatureID 709842.
WARNING 000597: Failed to insert input record with FeatureID 709843.
WARNING 000597: Failed to insert input record with FeatureID 709844.
WARNING 000597: Failed to insert input record with FeatureID 709845.
WARNING 000597: Failed to insert input record with FeatureID 709846.
WARNING 000597: Failed to insert input record with FeatureID 709847.
WARNING 000597: Failed to insert input record with FeatureID 709848.
WARNING 000597: Failed to insert input record with FeatureID 709849.
WARNING 000597: Failed to insert input record with FeatureID 709850.
WARNING 000597: Failed to insert input record with FeatureID 709851.
WARNING 000597: Failed to insert input record with FeatureID 709852.


......

WARNING 000597: Failed to insert input record with FeatureID 709984.
WARNING 000597: Failed to insert input record with FeatureID 709985.
WARNING 000597: Failed to insert input record with FeatureID 709986.
WARNING 000597: Failed to insert input record with FeatureID 709987.
WARNING 000597: Failed to insert input record with FeatureID 709988.
WARNING 000597: Failed to insert input record with FeatureID 709989.
WARNING 000597: Failed to insert input record with FeatureID 709990.
WARNING 000597: Failed to insert input record with FeatureID 709991.
WARNING 000597: Failed to insert input record with FeatureID 709992.
WARNING 000597: Failed to insert input record with FeatureID 709993.
WARNING 000597: Failed to insert input record with FeatureID 709994.
WARNING 000597: Failed to insert input record with FeatureID 709995.
WARNING 000597: Failed to insert input record with FeatureID 709996.
WARNING 000597: Failed to insert input record with FeatureID 709997.
WARNING 000597: Failed to insert input record with FeatureID 709998.
WARNING 000597: Failed to insert input record with FeatureID 709999.
WARNING 000597: Failed to insert input record with FeatureID 710000.
ERROR 000224: Cannot insert features
ERROR 000224: Cannot insert features
ERROR 000372: Spatial Reference for output is invalid, Please update to allow output to become valid
Failed to execute (FeatureClassToFeatureClass).
Failed at Thu Mar 22 15:38:04 2012 (Elapsed Time: 23 minutes 9 seconds)
从第一个错误我们可以看出,系统提示这个要素类里面数据的范围已经超过了该投影定义的范围,但是如果是通过ArcGIS 客户端导入导出的数据是不会出现这个问题的。那么就怀疑该数据并不是ArcGIS客户端做的导入、编辑、存储(存储类型)。

如果不是ArcGIS的ST_geometry存储或者不是ArcGIS客户端的导入导出,那么有可能是使用了OracleSpatial的存储,有可能使用了GDAL或者其他方式将数据导入到ArcSDE库里面的,为了验证这个,我们使用ArcToolbox工具,Check_geometry和Repair_Geometry做检查和修补。

使用Check_Geometry

Executing: CheckGeometry w D:\data\test.gdb\test.gdb\qq
Start Time: Fri Mar 23 09:13:59 2012
WARNING 000442: null geometry at 22809 in w
WARNING 000442: null geometry at 30003 in w
WARNING 000442: null geometry at 30162 in w
WARNING 000442: null geometry at 30303 in w
WARNING 000442: null geometry at 30473 in w
WARNING 000442: null geometry at 79139 in w
WARNING 000442: null geometry at 79734 in w
WARNING 000442: null geometry at 79777 in w
WARNING 000442: null geometry at 80533 in w
WARNING 000442: null geometry at 85816 in w
WARNING 000442: null geometry at 170592 in w
WARNING 000442: null geometry at 170599 in w
WARNING 000442: null geometry at 170754 in w
WARNING 000442: null geometry at 170765 in w
WARNING 000442: null geometry at 174984 in w
WARNING 000442: null geometry at 175150 in w
WARNING 000442: null geometry at 175180 in w
WARNING 000442: null geometry at 175233 in w
WARNING 000442: null geometry at 175315 in w
WARNING 000442: null geometry at 175403 in w
WARNING 000442: null geometry at 175527 in w
WARNING 000442: null geometry at 175647 in w
WARNING 000442: null geometry at 175673 in w
WARNING 000442: null geometry at 175710 in w
WARNING 000442: null geometry at 175800 in w
Succeeded at Fri Mar 23 09:17:07 2012 (Elapsed Time: 3 minutes 8 seconds)
我们可以看到好多为空的几何。

关于Check_Geometry工具可以检查什么问题如下:

  • 短线段 - 有些线段短于与几何关联的空间参考的系统单位所允许的长度。 
  • 空几何 - 该要素不具有几何或者 SHAPE 字段为空。 
  • 不正确的环走向 - 面的拓扑结构比较简单,但是面的环可能没有正确地定向(外环 - 顺时针,内环 - 逆时针)。 
  • 不正确的线段方向 - 各条线段的定向不一致。线段 i 的“到”点应该与线段 i+1 的“从”点相接。
  • 自相交 - 面无法与自身相交。 
  • 非闭合环 - 环中最后一条线段的“到”点必须与第一条线段的“从”点相接。 
  • 空的部分 - 几何具有多个部分,其中一个部分为空(没有几何)。 
  • 重复折点 - 几何的两个或多个折点坐标相同。 
  • 不匹配的属性 - 某线段端点的 Z 坐标或 M 坐标与下一条线段中与之重合的端点的 Z 坐标或 M 坐标不匹配。 
  • 不连续的部分 - 几何的某部分由断开的或不连续的部分组成。 
  • 空的 Z 值 - 几何的一个或多个折点 Z 值为空(例如,NaN)。

经过检查后,发现这些问题,再次与用户沟通,确定他们是使用OracleSpatial的方式进行存储。

那么说明一下,为什么都是一些图形,使用OracleSpatial存储的数据,不能导出到ArcGIS的St_Geometry呢?

针对这两个空间数据存储的不同,大家可以查资料参考,重点说一下就是,虽然OracleSpatial也是空间数据的存储方式,但是他们只针对计算机图形的那种死板的存储,也就是不管是否符合地理知识的数据,我都可以给你存下来,那么也就出现了我们前面遇到的相关问题。

1:我的要素类定义的投影范围小于我要素类里面数据的范围

2:要素类里面存在一些null 几何的情况

....

但是上面的问题,对ArcGIS来说肯定是不可以的,比较ArcGIS比Oracle更了解地理,更专业,所以对这些不符合常理的数据,ArcGIS都会有相关的警告和错误提示。

那么用户有疑问的是,虽然我的库里面是OracleSpatial存储的,那么我的FileGeodatabase的数据是ArcGIS导出来的,这个问题应该是ArcGIS默认存在ArcSDE里面的数据就是没有问题的,所以在导出过程中是不做检查的,但是一旦导入ArcSDE,肯定会有相关检查。

-----------------------------------------------------------------------------------

针对用户的问题我们可以做以下处理:

1:如果用户执意想让他们的数据原封不动的导入到ArcSDE里面,我们可以选择SDO_Geometry关键字,也就是这个数据以OracleSpatial方式进行存储,ArcGIS也是可以管理的。

2:如果用户想使用ST_Geometry进行存储,我们可以使用Repair_Geometry进行修复,然后再导入到ArcSDE库里面

Executing: RepairGeometry w DELETE_NULL
Start Time: Fri Mar 23 09:17:46 2012
WARNING 000986: C:\Users\ADMINI~1\AppData\Local\Temp\w0.txt contains the full list of non simple features.
WARNING 000107: Deleted feature 22809 because of empty geometry
WARNING 000107: Deleted feature 30003 because of empty geometry
WARNING 000107: Deleted feature 30162 because of empty geometry
WARNING 000107: Deleted feature 30303 because of empty geometry
WARNING 000107: Deleted feature 30473 because of empty geometry
WARNING 000107: Deleted feature 79139 because of empty geometry
WARNING 000107: Deleted feature 79734 because of empty geometry
WARNING 000107: Deleted feature 79777 because of empty geometry
WARNING 000107: Deleted feature 80533 because of empty geometry
WARNING 000107: Deleted feature 85816 because of empty geometry
WARNING 000107: Deleted feature 170592 because of empty geometry
WARNING 000107: Deleted feature 170599 because of empty geometry
WARNING 000107: Deleted feature 170754 because of empty geometry
WARNING 000107: Deleted feature 170765 because of empty geometry
WARNING 000107: Deleted feature 174984 because of empty geometry
WARNING 000107: Deleted feature 175150 because of empty geometry
WARNING 000107: Deleted feature 175180 because of empty geometry
WARNING 000107: Deleted feature 175233 because of empty geometry
WARNING 000107: Deleted feature 175315 because of empty geometry
WARNING 000107: Deleted feature 175403 because of empty geometry
WARNING 000107: Deleted feature 175527 because of empty geometry
WARNING 000107: Deleted feature 175647 because of empty geometry
WARNING 000107: Deleted feature 175673 because of empty geometry
WARNING 000107: Deleted feature 175710 because of empty geometry
WARNING 000107: Deleted feature 175800 because of empty geometry

这样就可以使用ArcSDE进行管理了。

通过上面的测试两种解决方案都成功入库!但是建议用户尽量使用ArcGIS的ST_Geometry进程存储,比较更专业!更高效!

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1974434次
    • 积分:23051
    • 等级:
    • 排名:第294名
    • 原创:354篇
    • 转载:11篇
    • 译文:11篇
    • 评论:899条
    新浪微博