English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What formula can I use to calculate a range of ALL coordinates (lon, lat) that are within a given distance (ex x=50 miles) from a given set of coordinates (ex. 40.948208, -074.295592)?

Answer example could be all longitude between 30-50 and all latitude between -50 and -100.

The following formula is used to calc the distance between 2 given points

R = earth’s radius (mean radius = 3956 miles)
Δlat = lat2− lat1
Δlong = long2− long1
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)
c = 2.atan2(√a, √(1−a))
d = R.c

2007-06-26 14:22:54 · 3 answers · asked by nkbsbl 2 in Science & Mathematics Physics

3 answers

The form of the example answer you give couldn't possibly be the definition of all points within a given distance of some defined point on a sphere, but rather approaches a rectangle as its size decreases. The area you want to cover is a circular cap centered on the reference point. The perimeter of this cap will be tangent to lines of lat & lon, but won't follow them for any distance. What you can do is create a yes/no calculator that uses the formulas you quote to calculate whether a given point is in the circle.

2007-06-28 03:37:48 · answer #1 · answered by kirchwey 7 · 0 0

I believe, since longitude seperations are not consistent in their physical measurement of distance, that this is not possible. (The distance in miles between longitudnal points is not fixed. They merge at the poles.)

Also, since you are looking for a circular answer, your example answer doesn't work. (It doesn't make a circle with a radius of whatever you're looking for.)

I believe the simplest way to state it is...

All points within XX mile radius of XX lat. and XX long.

2007-06-26 14:34:25 · answer #2 · answered by Anonymous · 0 0

It is the extension of the problem in 2D Distance = sqrt( (x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 )

2016-04-01 06:23:41 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers