Search code examples
mappinggeography

Determining the projection in a given map


I realise this is potentially not a programming question, however its a problem I keep bumping into as a programmer, so I figure others here might have useful knowledge to share.

I have a map of a region of the earth (it could be any, but here's an example) how should I determine the projection used in the map and then how should I programatically transform latitude and longitude coordinates into pixel positions on the image.

At the moment I have matlab code to open the image and plot the resulting (x,y) coord, but I can't figure out how to convert lat/longs to x,y!

Any help at all would be greatly appreciated.


Solution

  • It turns out that programatically calculating the projection of a map is a complex task of image processing. The way I managed to get around this problem is simply using maps that have well defined projections - for example Google maps use the Mercator projection, as do most maps of the UK (as our British Reference Grid is based on the Universal Transverse Mercator).

    I hope this helps someone else out!