Chandu557619


Hi All,

I am using live.com to locate some places in the map, i have a problem like i want to get all the latitudes and longitudes between the given distance.

i.e i will be having the Latitude and longitude of some place i need to get all the latitude and longitude values between the given distance in KM is that possible.

pls help me out regarding this issue

Thanks,

Ramachandra




Re: The problem with spheres...

Chuck S.


The problem with what you're proposing is that the distance between specific latitudes and longitudes is affected by the curvature of the earth (i.e. X degrees of latitude or longitude do not linearly correspond with X*F km). As you approach the equator, longitude is stretched out as the distance between "meridians" get farther apart. As you approach the poles, distances between parallels is stretched out, but distance between meridians compresses.

In short Yes, it's possible, but the transform isn't going to be as simple as a multiplicative factor.






Re: The problem with spheres...

Martin Xie - MSFT

Moved this thread from CLR to Windows Live Developer Forums Virtual Earth: Map Control Development.





Re: The problem with spheres...

Derek Chan

Ramachandra,

I'm assuming the scenario is that you have a route between A and B, and want to find out all the lat/longs of the route that is drawn

In short, it may be possible but extremely difficult. The problem is that if you take a route segment, say A1 and another route segment, A2, that route being drawn from A1 to A2 is not a straight line. Infact, it can be curved which all depends on the road being travelled so there really isn't any formula for determining those lat/longs that are being drawn. The only possible thing I can think about is actually hacking the VE API to give you the lat/longs while the route is actually being drawn on the map.

Hope that clarifies things,






Re: The problem with spheres...

Duncan Garratt

There are a number of good JavaScript routines on the web that will calculate distance between two Lat/long points. For server side calculations Franson is a very good toolkit.

http://franson.com

Duncan Garratt

www.gis-logic.co.uk






Re: The problem with spheres...

Jared H

Take a look at this post, and most notably the 3D spatial solution suggested by Duncan Lawler. All the material is there to reverse engineer this slightly and instead of drawing a circle, draw an arc with a reasonable amount of points to obtain lat/lon pairs in a straight (if curved) line between two points.