Re: help!
- From: "Bartc" <bc@xxxxxxxxxx>
- Date: Sun, 27 Jan 2008 02:33:17 GMT
<DarkAngel615@xxxxxxxxx> wrote in message
news:25bcd50c-45c4-4480-aaa8-944c1beab834@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ok, i need help figuring out this homework problem from Into to
Programming. I've got to find the lat/lon coordinates of a point.
Here's what I know:
pixel coordinates of the point (382,387)
the lower left corner of image is (0,0)
the pixel dimensions of the image (512,512)
lat/lon coordinates of the upper left corner of image
(36.261992,-89.857178)
lower right corner (36.244273,-89.835205)
I know this is basically a conversion problem, but how?
This sounds like basic arithmetic unless there's some catch (non-linear
lat/long for example).
The lat/long corresponding to (382,387) in your map of (512,512) would be:
lat = (382.0/512.0) * (36.244273-36.261992) + 36.261992
long = (387.0/512.0) * (-89.857178-(-89.835205)) + (-89.835205)
This assumes, if the image is 512x512 pixels, (0,0) and (382,387) are the
points at the bottom left of each pixel, while the top right point is
(511,511) (or (512,512) for the top/right of that pixel). But your
assignment may have different assumptions.
--
Bart
.
- Follow-Ups:
- Re: help!
- From: user923005
- Re: help!
- References:
- help!
- From: DarkAngel615
- help!
- Prev by Date: Re: help!
- Next by Date: crossword project works
- Previous by thread: Re: help!
- Next by thread: Re: help!
- Index(es):
Relevant Pages
|