in reply to Converting Pixels to LatLong
That depends on the projection used to obtain the map image.
This post is wrong from this point on.
If you draw a three points on the map such that
Ay == By && Ax != Bx
Ax == Cx && Ay != Cy
+=====================+ # # # A-------------B # # | # # | # # C # # # +=====================+
Is Alat == Blat && Along == Clong?
If so, every pixel represents the same long and lat difference.
Pixellat = (Blat - Alat) / (Bx - Ax)
Pixellong = (Clong - Along) / (Cy - Ay)
If not, the math gets a bit more complicated, but it's still pretty straightforward. You'll probably need a fourth point D such that
Dx == Bx && Dy == Cy
+=====================+ # # # A-------------B # # | | # # | | # # C-------------D # # # +=====================+
There surely exists modules to help you here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting Pixels to LatLong
by akho (Hermit) on Feb 14, 2007 at 19:19 UTC | |
by ikegami (Patriarch) on Feb 14, 2007 at 19:26 UTC |