Calculate X and Y position on a PNG Map from GPS Coordinate

拥有回忆 提交于 2019-12-06 09:37:08

You need to know the projection of the map. There are hundreds of different map projection and many of them can have the important constants that can have any meaning.

So, at first, you need to know, what map do you use?

After that, find the formulas for this projection and use them. For example, for UTM projection the formulas are here. But for another projection the formulas and the whole system will be absolutely different.

The next step, you'll have to imagine yourself how the abstract map will be shown on your screen.

For me, a pro in geomatic and programming, the whole task would take minimally 2 days for some exactly known and not rare map system. There always are serious problems in debugging, to set the point exactly. And there are always problems with formulas - you'll find several variants and will need to find the correct ones.

But if the map is already actively used by programmers, you could find not formulas, but pieces of code. Good luck!

Gigamegs

Most likely the map uses a mercantor projection. The problem is that the earth is a sphere but you have only 2 dimensions on a map. You need the co-ordinate of the 4 corners of the map and the map dimensions. The y-map value doesn't change but for the x-map value you need the mercantor projection. Then it become a linear transformation and either the width or the height of the map can be slightly different from the input:Convert lat/lon to pixel coordinate?.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!