【问题标题】:how to convert GIS DMS coordinates如何转换 GIS DMS 坐标
【发布时间】:2020-06-10 18:34:19
【问题描述】:

我知道这是一个非常广泛的主题 - 仍然 - 我想转换一个 GIS DMS 坐标,例如:

33° 0' 10'' , 33° 40' 30''

转成EPSG:3857格式,即:

3689865.02422557637、3212878.5986975324

(这不是计算转换,只是格式的一个示例)。

我知道地图供应商(ESRI 等)中有计算\转换。如果可能的话,我正在寻找这两种方法中的任何一种:

  1. nodejs 模块(proj4js?我查看了它,但找不到这样做的方法)。

  2. asp.net 核心固件功能\nuget ?

【问题讨论】:

    标签: node.js asp.net-core gis


    【解决方案1】:

    是的,proj4js 可以做到这一点。首先convert your DMS coordinates into decimal degrees,然后告诉 proj4js 从 WGS-84 转换为 EPSG:3857。

    很高兴,proj4js ships with this conversion,因此您不必在线查找基准字符串。

    const proj4= require("proj4");
    // TODO: that's not the correct conversion of the original DMS to decimal degrees :)
    console.log(proj4("WGS84", "EPSG:3857", [33.01, 33.4]));
    

    输出

    [ 3674656.3910859604, 3948518.4270993923 ]
    

    【讨论】:

      猜你喜欢
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-27
      • 1970-01-01
      • 2021-05-29
      • 2021-01-04
      • 1970-01-01
      相关资源
      最近更新 更多