墨卡托投影和缩放
http://wiki.openstreetmap.org/wiki/Mercator
使用上面的 C# 示例链接,我能够将纬度/经度投影到 x/y 坐标。但是,我在缩放方面遇到了问题。我想知道投影后每个像素有多少长度(以英里为单位?)。我想在渲染之前将地图缩放为每英里 500 像素或类似的值。
各位,真的没人回答吗?已经很久没有回复了。
http://wiki.openstreetmap.org/wiki/Mercator
With the C# example in the above link, I am able to project lat/lon to x/y co-ordinates. However, I'm having problem with scaling. I wonder how much length (in miles?) each pixel have after projection. I would like to scale the map before rendering as 500 pixels per mile or something like that.
Guys, really nobody to answer this? It's been quite long without answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像素的长度不会相同,这取决于您投影的地球的哪个区域。墨卡托保留角度,而不是长度。
http://en.wikipedia.org/wiki/Mercator_projection
查看地图 - 区域与赤道相比,两极周围的面积按比例放大。根据您想要做什么,您最好使用标准化投影,例如 UTM。您应该检查您的地图所在的世界部分使用了哪种投影。
另一种方法是将逆投影应用于两个像素以获得地理坐标并测量它们之间的大圆距离。维基百科有更多相关信息,但通常涉及一些数学知识。
The pixels will not be the same length, it depends on which area of the globe you are projecting. The mercator preserves angles, not lengths.
http://en.wikipedia.org/wiki/Mercator_projection
Look at the map - the areas around the poles are scaled up compared to the equator. Depending on what you want to do, you'd be better of using a standarized projection, like UTM. You should check which projection is used in the part of the world where your maps are from.
Another way would be to apply the inverse projection to two of your pixels to get the geographic coordinates and measure the great circle distance between them. Wikipedia has more info on that, but there is usually a bit of math involved.