PDA

View Full Version : Mapping long, lat to map-image




subsonix
Dec 12, 2011, 08:44 AM
Does anyone know of a sensible approach to map longitudes and latitudes to a map image?

A flat world map should distort the lines into curves, but how would one do this accurately. The idea is to map the long and lat relative to the graphical coordinates in the image, so that I can give a long/lat input and arrive at the exact x/y position in the image. Any ideas?



gnasher729
Dec 12, 2011, 12:37 PM
Does anyone know of a sensible approach to map longitudes and latitudes to a map image?

A flat world map should distort the lines into curves, but how would one do this accurately. The idea is to map the long and lat relative to the graphical coordinates in the image, so that I can give a long/lat input and arrive at the exact x/y position in the image. Any ideas?

If you google for "Mercator projection" that will probably give you some information.

subsonix
Dec 12, 2011, 01:24 PM
If you google for "Mercator projection" that will probably give you some information.

Thanks for this, I will investigate further. Meanwhile I found some information on how to transform long/lat values into cartesian coordinates. Basically, let the center of the map be coordinate 0, 0 then use a function (Haversine formula) to get to and from long/lat values.