【问题标题】:Latitude longitude mapping with image of my house带有我家图像的经纬度映射
【发布时间】:2011-05-13 11:08:55
【问题描述】:

我有我家的顶视图图像并且知道左上像素的纬度经度,即 0,0 现在如何获取其他像素的纬度经度值?

在谷歌搜索时,我发现了以下内容:

function longToX(longitudeDegrees)
  {
    var longitude =degreesToRadians(longitudeDegrees);
    return (radius * longitude);
  }

  function latToY(latitudeDegrees)
  {
    var latitude =degreesToRadians(latitudeDegrees);
    var newy = radius/2.0 * 
            Math.log( (1.0 + Math.sin(latitude)) /
                      (1.0 - Math.sin(latitude)) );
    return newy;
  }

 function xToLong(xx)
  {
    var longRadians = xx/radius;
    var longDegrees = radiansToDegrees(longRadians);

    /* The user could have panned around the world a lot of times.
    Lat long goes from -180 to 180.  So every time a user gets 
    to 181 we want to subtract 360 degrees.  Every time a user
    gets to -181 we want to add 360 degrees. */

    var rotations = Math.floor((longDegrees + 180)/360)
    var longitude = longDegrees - (rotations * 360)
    return longitude;
  }

  function yToLat(yo)
  {
    var latitude =  (Math.PI/2) - 
                    (2 * Math.atan(
                       Math.exp(-1.0 * yo / radius)));
    return radiansToDegrees(latitude);
  }  

半径 = 6371 公里地球半径.. 但是如果我通过 0,0 我会得到 0,0 如何修复 0,0 的纬度经度并从中派生其他值

【问题讨论】:

    标签: image latitude-longitude


    【解决方案1】:

    您需要知道像素之间的距离。要将距离转换为度数,您可以使用一海分钟(1/60 度)纬度为 1,852 米或约 6076 英尺这一事实。赤道处的经度相同,但需要乘以其他地方的纬度余弦。

    1 度纬度 = 1852 米

    1 度经度 = 1852 米 * cos(纬度)

    (您可能需要将纬度乘以 pi/180 以将它们转换为余弦函数的弧度。)

    【讨论】:

      猜你喜欢
      • 2011-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-05
      • 1970-01-01
      • 2016-02-16
      • 1970-01-01
      相关资源
      最近更新 更多