Bookmark this page: Add Help me to convert X Y to Latitude Longitude on mouse click  to Yahoo MyWeb Add Help me to convert X Y to Latitude Longitude on mouse click  to Google Bookmarks Add Help me to convert X Y to Latitude Longitude on mouse click  to Windows Live Add Help me to convert X Y to Latitude Longitude on mouse click  to Del.icio.us Digg Help me to convert X Y to Latitude Longitude on mouse click ! Add Help me to convert X Y to Latitude Longitude on mouse click  to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by sunita.svr on May 5, 2006, 3:30 pm
Hi all,
i have a problem in converting X,Y to Lat Long in the following
condition.
I've been given 2 points with coordinates and .
Now while mapping the rectangular area covered by these 2 points on to
the computer screen, how do i calculate the exact kilometer/miles value
between those points corresponding to the pixels value at the point of
my mouse click, considering the spherical nature of the earth's
surface.

i know the formulae to convert Lat long to Kms which is given below.
d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
using this formulae i can find the distance between the pts and
linearly map the Kms/miles on the rectangular area covered by the 2 pts
and find the lat long. but this is not accurate because of the
spherical nature of the earth. can anyone plz help me to do the same
accurately.
Thanks,
Su


Posted by Jacquelin Hardy on May 6, 2006, 8:47 am
> d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))

The above formula takes into account he spherical form of the earth.

d = sqr ( ( dLat * dLat) + (dLong * dLong)*cos meanLat) This one doesn't.

JH
1146857422.797768.287130@i40g2000cwc.googlegroups.com...
> Hi all,
> i have a problem in converting X,Y to Lat Long in the following
> condition.
> I've been given 2 points with coordinates and .
> Now while mapping the rectangular area covered by these 2 points on to
> the computer screen, how do i calculate the exact kilometer/miles value
> between those points corresponding to the pixels value at the point of
> my mouse click, considering the spherical nature of the earth's
> surface.
> i know the formulae to convert Lat long to Kms which is given below.
> d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
> using this formulae i can find the distance between the pts and
> linearly map the Kms/miles on the rectangular area covered by the 2 pts
> and find the lat long. but this is not accurate because of the
> spherical nature of the earth. can anyone plz help me to do the same
> accurately.
> Thanks,
> Su
>