纬度/经度转换为x/y坐标 [英] lat/lon conversion to x/y-coordinates

查看:194
本文介绍了纬度/经度转换为x/y坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个openstreetmap图像. 左上角是lat:80 lon:-169 右下角为lat:-56 lon:190 图片的宽度为:2618,高度为:1513

I have a openstreetmap image. left upper corner is lat: 80 lon: -169 and right lower corner is lat:-56 lon: 190 The image has the width: 2618 and the height: 1513

如何将给定的经/纬度坐标转换为图片的x/y坐标?

How do I convert given lat/lon-coordinates to the pictures x/y-coordinates?

我自己尝试过,但是不知道如何转换坐标.

I tried it by myself, but couldn't figure out how to convert the coordinates.

我希望有人能够回答我的问题.

I hope someone can answer my question.

推荐答案

所提出的问题几乎是荒谬的.要求的区域几乎覆盖了整个地球,从80N 169W到56S 190E.这样一来,从170W到169W的磁极到磁极就没有了,在80N以北的北极周围有一个磁盘,在56S以南的南极周围有一个较大的磁盘.从全球如此大的区域到屏幕,都没有一个最佳的投影.请参见地理坐标

The question, as asked, is almost nonsensical. The area requested covers almost the entire globe, from 80N 169W to 56S 190E. That leaves out the band pole to pole from 170W to 169W, a disk around the north pole north of 80N, and a larger disk around the south pole south of 56S. There is no single best projection from that large an area of the globe to a screen. See wiki on geographic coordinates and map projections as starting places for general background.

也就是说,如果输入合理,这是一个合理的问题.

That said, this is a reasonable question if the inputs are reasonable.

对于赤道附近非常小的区域,一个简单的投影是将纬度映射到Y,将经度映射到X.当您离开赤道时,由于度数长度的减小,这将引入较小的失真.纬度接近任一极时的经度.对于相对于赤道不对称的足够大的区域,这将使上边缘的长度(以英里为单位)与下边缘明显不同.

For very small areas near the equator, a simple projection is to map latitude to Y and longitude to X. As you move away from the equator, this will introduce a small distortion due to the decrease in the length of the degree of longitude as the latitude approaches either pole. For a large enough area that is not symmetric about the equator, this will make the length of the top edge in miles noticeably different from the bottom edge.

更好的投影将纬度映射到Y,但是将经度按cos(latitude)缩放以获得X.对于足够小的区域,缩放比例在整个图形上几乎是恒定的,并且可以一次计算并保持恒定.

A much better projection would map latitude to Y, but scale longitude by cos(latitude) to get X. For small enough areas, the scale is nearly constant over the whole figure and can be calculated once and held constant.

地图投影的一般主题比此处确定的最简单的解决方案具有更多的解决方案.由于每个预测的目标不同,它们也有所不同.投影的选择取决于预期的用途,即使对于特定的用途,通常也没有单一的最佳"投影.

The general subject of map projection has many more solutions than the simplest identified here. They vary due to the varying goals of each projection. The choice of projection depends on the intended use, and there is generally no single "best" projection even for specific uses.

这篇关于纬度/经度转换为x/y坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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