|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: Converting Pixels to LatLongby akho (Hermit) |
| on Feb 14, 2007 at 20:03 UTC ( [id://600065]=note: print w/replies, xml ) | Need Help?? |
|
If it's a Mercator projection, then
long = x Where lat, long, x, y of the center point == 0. Most probably. This should be adjusted to scale, of course. This can be done for long, as it's just linear. Lat is a bit harder, however. You should find a point with known lat_real on your map, then find it's lat_formula using the above formula. If the map was linearly stretched (which it probably was), you can use lat = (lat_real / lat_formula) * atan(sinhy) I strongly advise you to check these formulas for sanity before using them, though (just check several more points, like cities, peninsulas or whatever is visible on your map).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||