Re: help!



"Bartc" <bc@xxxxxxxxxx> writes:

user923005 wrote:
On Jan 26, 6:33 pm, "Bartc" <b...@xxxxxxxxxx> wrote:
<DarkAngel...@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.

There are a couple of projections for which lat/lon are linear on a
map, but you should not count on it.

Given that these coords appear to be close to the South Pole,

At lat 36 degrees?

you may be
right. But the assignment (posted to comp.graphics.algorithms) does not
mention this and the image does not look like it either. That would have
been a tough Intro to Programming assignment.

I think you are right that the full "apply map projection" solution is
not called for, but the reason would be the very narrow range of
lat/lon co-ordibates over the image, coupled to the fact that the
range in *not* near any point that are likely to be singularities in
the projection.

--
Ben.
.



Relevant Pages

  • Re: Simple position plotting
    ... Especially if your coordinate system is lat/lon, 1 degree lat is a totally different distance than 1 degree lon. ... ......take raster maps of small geographic areas with cartesian coordinate systems - i.e., UK Ordnance Survey 1:10000 Landplan series - and consider that WGS84 latitude/longitude from a GPS receiver can linearly be converted to pixel positions on that map image, provided the map image has been accurately geo-referenced using WGS84 lat/long to pixel referencing? ... My *suspicion* is that the inaccuracies are dominantly due to inaccuracies in my georeference "calibration" measurements ...
    (comp.infosystems.gis)
  • Re: help!
    ... I've got to find the lat/lon coordinates of a point. ... points at the bottom left of each pixel, while the top right point is ... You need to know the projection, the reference ellipsoid and you need ...
    (comp.programming)
  • Re: help!
    ... I've got to find the lat/lon coordinates of a point. ... are the points at the bottom left of each pixel, ... been a tough Intro to Programming assignment. ...
    (comp.programming)
  • Re: help!
    ... I've got to find the lat/lon coordinates of a point. ... The lat/long corresponding to in your map of ... are the points at the bottom left of each pixel, ...
    (comp.programming)
  • Re: help!
    ... Programming. ... I've got to find the lat/lon coordinates of a point. ... points at the bottom left of each pixel, while the top right point is ... assignment may have different assumptions. ...
    (comp.programming)