如何获得经度纬度的格式E6在Android谷歌地图 [英] How to get E6 format of Longitude Latitude for Google Maps on Android

查看:243
本文介绍了如何获得经度纬度的格式E6在Android谷歌地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何找出在具体 E6位置的经度纬度值。 例如,我用Google搜索长纬度亚松森,巴拉圭首都的。它返回我:

how do i find out the SPECIFIC E6 values of longitude latitude of a location. For example, i googled for long-lat of Asuncion, the capital city of Paraguay. It returns me:

的纬度和亚松森的经度,巴拉圭是25°16'S,57°40瓦

现在我要如何转换的长纬度这种格式为长纬度其中机器人理解E6的格式?究竟这是 E6 的事?

Now how do i convert THIS format of long-lat into E6 format of long-lat which android understands? What exactly IS THIS E6 thing?

[P.S。我也用Google搜索E6长纬度亚松森.......没有运气]

[p.s. i also googled for E6 long-lat of Asuncion....... with no luck]

推荐答案

第1步转换,从DMS为十进制度 <一个href="http://en.wikipedia.org/wiki/Geographic_coordinate_conversion#Conversion_from_DMS_to_Decimal_Degree">From维基百科

给定一个DMS(度,分,秒)的坐标,如 87°43'41W ,这是微不足道的将其转换为数字使用以下方法十进制度:   

  • 在总的度数   
    = 87
  •   
  • 总秒数   
    = 43'41=(43 * 60 + 41 * 1)=2621秒。
  •   
  • 在小数部分除以3600秒总数   
    =三千六百分之二千六百二十一= 0.728056
  •   
  • 添加分数度的整角度,以产生最终的结果   
    = 87 + 0.728056 = 87.728056。
  •   
  • 既然是西经度坐标,否定的结果。   
    = -87.728056。
  • Given a DMS (Degrees, Minutes, Seconds) coordinate such as 87°43′41″ W, it's trivial to convert it to a number of decimal degrees using the following methods:

  • Total number of degrees
    = 87
  • Total number of seconds
    = 43′41″ = (43*60 + 41*1) = 2621 seconds.
  • The fractional part is total number of seconds divided by 3600
    = 2621 / 3600 = 0.728056
  • Add fractional degrees to the whole degrees to produce the final result
    = 87 + 0.728056 = 87.728056.
  • Since it is a West longitude coordinate, negate the result.
    = -87.728056.
  • 长纬度参考:

    Lat.  North = +
    Lat.  South = -
    Long. East  = +
    Long. West  = -
    


    第2步转换从十进制度到MicroDegrees(E6的格式) <一个href="http://stackoverflow.com/questions/3577866/android-geopoint-with-lat-long-values/3577919#3577919"标题=从这么讨论>从SO讨论

    MicroDegrees (E6的格式)= DecimalDegrees * 1e6个   中提到的Andr​​oidDevGuide以及

    MicroDegrees (the E6 format) = DecimalDegrees * 1e6
    --- as mentioned in AndroidDevGuide as well

    因此​​,

    float lat   = -23.4456f;   //in DecimalDegrees
    float lng   = 45.44334f;   //in DecimalDegrees
    GeoPoint gp = new GeoPoint((int)(lat * 1E6), (int)(lng * 1E6));
    

    这篇关于如何获得经度纬度的格式E6在Android谷歌地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆