书写纬度&经度元组 [英] Preferred order of writing latitude & longitude tuples

查看:112
本文介绍了书写纬度&经度元组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在处理GIS源代码时,你经常需要编写经度和纬度坐标元组。在Google地图链接(123,456)中:

http://maps.google.com/maps/ms?msid=214518704716144912556.00046d7689a99e95b721c&msa=0&ll=123,456&spn= 0.007996,0.026865



哪个是首选订单(以及为什么?)


  • 经纬度


  • 经度,纬度


  • 我已经看到两种方法都被用于各种系统,我希望能够找到一些证据来坚持其他系统。

    解决方案

    EPSG:4326明确指出坐标顺序应该是纬度,经度。许多软件包仍然使用经度,纬度排序。这种情况在项目期限和程序员的理智上造成了难以想象的混乱。

    最好的方法是充分了解软件中每个组件的预期轴顺序叠加。 PostGIS预计lng / lat。 WFS 1.0使用lng / lat,但WFS 1.3.0遵循标准并使用lat / lng。 GeoTools默认为lat / lng,但可以用系统属性覆盖。



    GeoTools关于问题历史和解释的文档值得一读:
    http://docs.geotools.org/latest/userguide/library/referencing/order.html


    When dealing with GIS source code you often need to write latitude and longitude coordinate tuples.

    E.g. in Google Maps links (123, 456):

    http://maps.google.com/maps/ms?msid=214518704716144912556.00046d7689a99e95b721c&msa=0&ll=123,456&spn=0.007996,0.026865

    Which is preferred order (and why?)

    • latitude, longitude

    • longitude, latitude

    I have seen both being used in various systems and I hope to find some evidence to stick with other one.

    解决方案

    EPSG:4326 specifically states that the coordinate order should be latitude, longitude. Many software packages still use longitude, latitude ordering. This situation has wreaked unimaginable havoc on project deadlines and programmer sanity.

    The best guidance one can offer is to be fully aware of the expected axis order of each component in your software stack. PostGIS expects lng/lat. WFS 1.0 uses lng/lat, but WFS 1.3.0 defers to the standard and uses lat/lng. GeoTools defaults to lat/lng but can be overridden with a system property.

    The GeoTools docs on the history and explanation of the problem are worth a read: http://docs.geotools.org/latest/userguide/library/referencing/order.html

    这篇关于书写纬度&经度元组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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