AE 坐标转换_ 常见细节

http://hi.baidu.com/%D6%DC%B4%BA521/blog/item/16eb3902a54fcb6503088185.html

 

  /// <summary>
        /// 从经纬坐标串生成 投影坐标下的线
        /// </summary>
        /// <param name="gcsStr"></param>
        /// <returns></returns>
        public static IPolyline GetLinePCSFromGCSStr(string gcsStr)
        {
            ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
            IProjectedCoordinateSystem pcsSys = spatialReferenceFactory.CreateProjectedCoordinateSystem((int)esriSRProjCS4Type.esriSRProjCS_Xian1980_3_Degree_GK_Zone_39);
            IGeographicCoordinateSystem gcsSys = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCS3Type.esriSRGeoCS_Xian1980);

            string[] ar_pts = gcsStr.Split(';');
            object tempType = Type.Missing;
            IPointCollection pPtCollection = new PathClass();
            for (int i = 0; i <= ar_pts.Length - 1; i++)
            {
                IPoint pt = new PointClass();
                pt.X = Convert.ToDouble(ar_pts[i].Split(',')[0]);
                pt.Y = Convert.ToDouble(ar_pts[i].Split(',')[1]);
                IGeometry geoGcs = (IGeometry)pt;
                geoGcs.SpatialReference = gcsSys;
                geoGcs.Project(pcsSys);
                IPoint ptAfter = geoGcs as IPoint;
                pPtCollection.AddPoint(ptAfter, ref tempType, ref tempType);
            }

            IGeometryCollection pGeoCollection = new PolylineClass();
            pGeoCollection.AddGeometry(pPtCollection as IGeometry, ref tempType, ref tempType);
            return pGeoCollection as IPolyline;
        }

备注:有坐标,无“度-带”,要确定度带。
解决方式:逐个试。某个“度-带”投影后 基本重合,即是。

 

常见细节:

(1) PCS: GK --> Xian80 3D  39Z 的featureClass, 使用3DAnalyst ceate TIN. TIN的坐标系统会变成 User_Defined Tranverse Mervator.

              对比显示featureclass的spatialReference和 TIN的,有此差异.

              显示,两者叠合

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值