C语言 如何将(纬度,经度)转换为(x,y)坐标?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2026112/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I convert (latitude,longitude) into (x,y) coordinates?
提问by Badr
What is the formula for real world (latitude,longitude) conversion into (x,y) coordinates?
现实世界(纬度,经度)转换为(x,y)坐标的公式是什么?
回答by Michael J
Latitudes and longitudes exist on a spherical globe. Map X and Y coordinates exist on a (theoretically) flat map.
纬度和经度存在于球形地球上。地图 X 和 Y 坐标存在于(理论上)平面地图上。
To convert between them, you need to "project" the spherical coordinates onto the flat map.
要在它们之间进行转换,您需要将球坐标“投影”到平面地图上。
There are many different ways to do projections. Some are optimised for particular regions. An earlier poster mentioned the Mercator projection. This is a popular one, but has its limitations (as all of them do).
有许多不同的方法可以进行投影。有些针对特定区域进行了优化。较早的海报提到了墨卡托投影。这是一种流行的方法,但也有其局限性(就像所有人一样)。
Stage one is probably to better understand your needs. What sort of latitude/longitude data do you have? What do you plan to do with it? Is your data confined to particular regions? What level of accuracy is needed? Is conversion speed important? (You may need to trade speed against accuracy).
第一阶段可能是为了更好地了解您的需求。你有什么样的纬度/经度数据?你打算用它做什么?您的数据是否仅限于特定区域?需要什么级别的准确度?转换速度重要吗?(您可能需要用速度来换取准确性)。
Wikipedia has a reasonable article on UTM (Mercator) projections.

