在创建数据集的时候,提示The XY domain on the spatial reference is not set or invalid错误。

原因:未设置空间参考(ISpatialReference:pSpatialReference)的域范围(Domain)。

解决办法:

(1) 通过以下代码进行设置Domain即可:

  pSpatialReference.SetDomain(xmin, xmax, ymin, ymax);

或者

            ESRI.ArcGIS.Geometry.ISpatialReferenceResolution spatialReferenceResolution = pSpatialReference as ESRI.ArcGIS.Geometry.ISpatialReferenceResolution;
            spatialReferenceResolution.ConstructFromHorizon();
            ESRI.ArcGIS.Geometry.ISpatialReferenceTolerance spatialReferenceTolerance = spatialReferenceResolution as ESRI.ArcGIS.Geometry.ISpatialReferenceTolerance;
            spatialReferenceTolerance.SetDefaultXYTolerance();

设置完毕后,可以通过:

  pSpatialReference.GetDomain(out XMin,out XMax,out YMin,out YMax) 查看Domain

相关文章:

  • 2021-11-08
  • 2021-10-08
  • 2021-04-16
  • 2021-07-08
  • 2022-12-23
  • 2021-05-31
  • 2022-02-06
  • 2022-02-16
猜你喜欢
  • 2021-06-21
  • 2021-09-06
  • 2021-06-12
  • 2021-12-12
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案