美文网首页
坐标转换

坐标转换

作者: 山华水清 | 来源:发表于2017-10-28 13:07 被阅读51次

近两天需要把平面坐标转换为标准的WGS84后使用百度逆地址编码
搜索出资料记录一下

  1. 类库 程序ProjNet4GeoAPI
    static void PtsToPts(ICoordinateSystem fromCS, ICoordinateSystem toCS,List<double[]> pts, out List<double[]> results)
   {
        CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
        ICoordinateTransformation trans = ctfac.CreateFromCoordinateSystems(fromCS, toCS);
        results = trans.MathTransform.TransformList(pts);
   }
 static void Main(string[] args)
   {
        string bj1954Lcc= "……"; //见上文
        IProjectedCoordinateSystem fromCS = CoordinateSystemWktReader.Parse(bj1954Lcc) as IProjectedCoordinateSystem;
        GeographicCoordinateSystem toCS = GeographicCoordinateSystem.WGS84;

        double[] xPts = new double[4] { 20634500, 20635500, 20634500, 20635500 };
        double[] yPts = new double[4] { 4660000, 4660000, 4659000, 4659000 };

        List<double[]> pts = new List<double[]>();
        for (int i = 0; i < 4; i++)
        {
            double[] xy = new double[] { xPts[i], yPts[i] };
            pts.Add(xy);

        List<double[]> results = new List<double[]>();
        PtsToPts(fromCS, toCS, pts, out results);

        foreach (double[] result in results)
        {
            Console.WriteLine("{0},{1}", result[0], result[1]);
        }
   }
  1. 百度地图逆地址编码
    百度逆地理编码服务

  2. GDAL相关
    ...and...You can find the GDAL API documentation here
    There is an GDAL API tutorial here
    The OGR API documentation is here
    The OSR API documentation is here
    All the links you need for GDAL can be reached from http://www.gdal.org/
    All the links you need for OGR/OSR can be reached from http://www.gdal.org/ogr/
    下载编译后的GDAL地址
    参考资料:
    [类库地址,包含GeoAPI、proj4net、ProjNet4GeoAPI]
    (https://pan.baidu.com/s/1skMrbHF)
    DotSpatial.Projections Vs. ProjNET4GeoAPI
    星星分享

相关文章

  • 坐标转换

    http://blog.csdn.net/qq_35607510/article/details/53992602...

  • 坐标转换

    (CGRect)convertRect:(CGRect)rect toView:(nullable UIView ...

  • 坐标转换

    近两天需要把平面坐标转换为标准的WGS84后使用百度逆地址编码搜索出资料记录一下 类库 程序ProjNet4Geo...

  • 坐标转换

    1、将米转换成坐标度数 2、根据坐标点和半径将地图缩放到合适等级

  • 👈坐标转换

    / 将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值 -(CGPoi...

  • 坐标转换

  • 坐标转换

    世界空间 如何转换为 屏幕空间?

  • 坐标转换

    像素坐标转世界坐标的计算[https://www.jianshu.com/p/4566a1281066]

  • 坐标转换

    matlab计算过程 >> y1=[1.5035820007324219 2.1732330322265625 1...

  • 坐标转换

网友评论

      本文标题:坐标转换

      本文链接:https://www.haomeiwen.com/subject/fdajpxtx.html