【问题标题】:Calculation of Latitude and Longitude from given point and radius从给定点和半径计算纬度和经度
【发布时间】:2012-04-20 13:31:52
【问题描述】:

我有纬度、经度和半径。你能帮我从给定的点(纬度和经度)和半径中找到另一个纬度和经度吗?

【问题讨论】:

  • 2个问题:你想找到其他任何一点还是怎么做; (2) 你尝试过什么?
  • 如果你已经知道了经纬度,你想到的“其他”经纬度是什么?
  • *the 其他经纬度*...? 还有什么纬度经度?
  • 我必须从给定的纬度经度和半径做一个圆。为此我需要圆圆周上的点。

标签: java


【解决方案1】:

您是否试图找出另一个经纬度是否在您的初始经纬度的某个半径范围内?如果是这样,请查看this other StackOverflow post

【讨论】:

    【解决方案2】:

    您将需要比点和半径更多的信息。您还需要圆中点的角度。

    使用半径和角度,您必须应用trigonometric 法则并绘制具有半径、高度和宽度尺寸的假想三角形。高度和宽度将为您提供与当前纬度和经度的距离。

    例如:

    for (int angle = 0; angle < 360; angle++){
        double x = getDistanceX(radius, angle);
        double y = getDistanceY(radius, angle);
        if (angle > 180) 
            x *= -1;
        if (angle > 90 && angle < 270)
            y *= -1;
        double newLatitude = getCalculateLatitude(latitude, x);
        double newLongitude = getCalculateLatitude(longitude, y);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-26
      相关资源
      最近更新 更多