zoukankan      html  css  js  c++  java
  • GIS

    https://github.com/Turfjs/turf/tree/master/packages

    https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts //经纬度计算的算法,js方法名就是turf-destination

    http://turfjs.org/docs/#destination //各种空间计算方法

    const coordinates1 = getCoord(origin);

    const longitude1 = degreesToRadians(coordinates1[0]);

    const latitude1 = degreesToRadians(coordinates1[1]);

    const bearingRad = degreesToRadians(bearing);

    const radians = lengthToRadians(distance, options.units);

            // Main

            const latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +

                Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));

            const longitude2 = longitude1 + Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1),

                Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));

            const lng = radiansToDegrees(longitude2);

            const lat = radiansToDegrees(latitude2);

        return point([lng, lat], options.properties);

  • 相关阅读:
    有道
    excel 数据入库
    iso-8859-1 Unicode 编码
    爬虫编码问题
    WIKi 百科爬虫
    降低耦合性获取微博数据
    Python基础总结3-字符串
    Python基础总结2
    Linux常用命令04(其他命令)
    Linux常用命令03(系统信息)
  • 原文地址:https://www.cnblogs.com/mol1995/p/11002864.html
Copyright © 2011-2022 走看看