zoukankan      html  css  js  c++  java
  • ArcEngine 坐标系转换

    /// <summary>
    /// 地理坐标系 转 投影坐标系
    /// </summary>
    /// <param name="x"></param>
    /// <param name="y"></param>
    /// <param name="GCSType">地理坐标系编号</param>
    /// <param name="PRJType">投影坐标系编号</param>
    /// <returns></returns>
    private IPoint GCStoPRJ(double x, double y, int GCSType, int PRJType)
    {
        IPoint pPoint = new PointClass();
        pPoint.PutCoords(x, y);
        ISpatialReferenceFactory pSRF = new SpatialReferenceEnvironmentClass();
        pPoint.SpatialReference = pSRF.CreateGeographicCoordinateSystem(GCSType);
        //GCS_WGS_1984 WKID: 4326 权限: EPSG
        pPoint.Project(pSRF.CreateProjectedCoordinateSystem(PRJType));
        //Xian_1980_3_Degree_GK_CM_114E  WKID: 2383 权限: EPSG
        return pPoint;
    }
    
    /// <summary>
    /// 投影坐标系 转 地理坐标系
    /// </summary>
    /// <param name="x"></param>
    /// <param name="y"></param>
    /// <param name="GCSType">地理坐标系编号</param>
    /// <param name="PRJType">投影坐标系编号</param>
    /// <returns></returns>
    private IPoint PRJtoGCS(double x, double y,int GCSType, int PRJType)
    {
        IPoint pPoint = new PointClass();
        pPoint.PutCoords(x, y);
        ISpatialReferenceFactory pSRF = new SpatialReferenceEnvironmentClass();
        pPoint.SpatialReference = pSRF.CreateProjectedCoordinateSystem(PRJType);
        pPoint.Project(pSRF.CreateGeographicCoordinateSystem(GCSType));            
        return pPoint;
    }
  • 相关阅读:
    MySQL组提交(group commit)
    MySQL 热快问题解决
    Mysql 高可用集群PXC
    向量的点积(标量积、内积)
    BitmapData.threshold()方法
    Unity 自定义导入时切割Sprite
    匀变速直线运动的速度与位移的关系
    1.1.2 三角形余弦定理
    ccc切割刚体
    Unity 获取指定资源目录下的所有文件
  • 原文地址:https://www.cnblogs.com/jay-xu33/p/7493514.html
Copyright © 2011-2022 走看看