zl程序教程

您现在的位置是:首页 >  其它

当前栏目

ArcGIS中Shapefile和Geodatabase坐标容差的问题

坐标 ArcGIS 问题
2023-09-14 09:02:21 时间

转自原文 ArcGIS中Shapefile和Geodatabase坐标容差的问题

 

ArcGIS中,Shapefile文件是没有容差设置的,所以无论什么单位的坐标写入shapefile文件,都不存在容差问题。而在Geodatabase(gdb、mdb、sde)中,却有容差的问题。Geodatabase的默认的resolution为0.0001个单位,当单位为度的时候,0.0001度相当于11米左右,误差就相当的大,所以在写入Geodatabase坐标数据的时候,切记要把容差设置为0.

ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
ISpatialReference spatialReference = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);
ISpatialreferenceResolution srr=spatialReference as ISpatialReferenceResolution;
srr.set_XYResolution(true,0.0);