zoukankan      html  css  js  c++  java
  • ArcEngine:The XY domain on the spatial reference is not set or invalid错误

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

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

    解决方法:通过以下代码进行设置Domain即可:pSpatialReference.SetDomain(xmin, xmax, ymin, ymax);

    代码示例:

    ISpatialReferenceFactory pSpatialReferenceEnvironment = new SpatialReferenceEnvironment();
    pComReleaser.ManageLifetime(pSpatialReferenceEnvironment);
    ISpatialReference pSpatialReference = pSpatialReferenceEnvironment.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_World_Mercator);
    pComReleaser.ManageLifetime(pSpatialReference);
    pSpatialReferenceEnvironment.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);
    pSpatialReference.SetDomain(-60000000, 60000000, -60000000, 60000000);
    //创建要素数据集
    IFeatureDataset pFeatureDataset = PGeoDbGeneral.CreateFeatureDataset(pWorkspace, txtFtDataset.Text, pSpatialReference);
    pComReleaser.ManageLifetime(pFeatureDataset);

  • 相关阅读:
    冒泡排序
    选择排序
    算法分析(54页)
    算法设计分析(44页)
    算法设计分析(44页)
    数据结构——算法设计(12页)方案三
    数据结构——算法设计(12页)方案三
    区间dp
    区间dp
    动态规划的进一步理解
  • 原文地址:https://www.cnblogs.com/Jingkunliu/p/4497616.html
Copyright © 2011-2022 走看看