# How to Measure the Distance Between Two Points in GIS

Written by tony allevato
• Share
• Tweet
• Share
• Pin
• Email

Coordinates that represent points on a map in geographic information systems (GIS) are expressed using longitude and latitude. Longitude lines are the imaginary lines that stretch vertically from the north pole to the south pole, and therefore describe east-west position; latitude lines stretch horizontally around the earth and describe north-south position.

Determining the distance between two points on a map can be complicated because you must remember to take the curvature of the earth into account if you want accurate results, especially when the points are farther than a few miles apart. The distance that considers this factor is called the "great circle distance."

Skill level:
Moderate

### Things you need

• Pencil and paper
• Scientific calculator

## Instructions

1. 1

Choose the appropriate sign for each longitude and latitude value based on the hemisphere they are located in. Positive numbers represent latitudes north of the equator and longitudes east of the prime meridian. Negative numbers represent latitudes south of the equator and longitudes west of the prime meridian.

For example, using JFK International Airport in New York City, NY as Point 1 and Sydney Airport in Sydney, Australia as Point 2:

Point 1: 40°38'23'' N, 73°46'44'' W = 40°38'23'', –(73°46'44'')

Point 2: 33°56'46'' S, 151°10'38'' E = –(33°56'46''), 151°10'38''

2. 2

If the coordinates are in degrees-minutes-seconds form, convert them to decimal by dividing the minutes by 60, dividing the seconds by 3600, and then adding those two values to the number of degrees. (For example, 80°12'30'' = 80 + (12 / 60) + (30 / 3600) = 80.28333...)

For JFK and Sydney:

For point 1 (JFK):

40°38'23'', –(73°46'44'') is 40.639722, –73.778889

For point 2 (Sydney):

–(33°56'46''), 151°10'38'' is –33.946111, 151.177222

3. 3

Convert the decimal degrees to radians by multiplying them by pi and then dividing by 180. Let LAT1 and LAT2 be the latitudes of the two points in radians, and let LON1 and LON2 be the longitudes in radians. The order of the two points does not matter.

For JFK and Sydney:

JFK:

LAT1 = 40.639722 * pi / 180 = 0.709297

LON1 = –73.778889 * pi / 180 = –1.28768

Sydney:

LAT2 = –33.946111 * pi / 180 = –0.592471

LON2 = 151.177222 * pi / 180 = 2.63854

4. 4

Compute DLON, the difference between the two longitudes, and DLAT, the difference between the two latitudes.

For JFK and Sydney:

DLAT = (0.709297 – (–0.592471)) = 1.30177

DLON = ((–1.28768) – 2.63854) = –3.92622

5. 5

Compute the angular distance, ANG, with the following formula:

ANG = 2 * arcsin(sqrt(sin^2(DLAT / 2) + cos(LAT1) * cos(LAT2) * sin^2(DLON / 2)))

In this formula, "sin" is the sine function, "cos" is the cosine function, "arcsin" is the inverse sine function, and "sqrt" is the square root. This intermediate result is expressed in radians.

For JFK and Sydney:

ANG = 2 * arcsin(sqrt(sin^2(1.30177 / 2) + cos(0.709297) * cos(–0.592471) * sin^2(–3.92622 / 2))) = 2.5135

6. 6

Multiply ANG by the radius of the earth, in whichever units you wish the final distance to be expressed. Some common values are 6,371.01 kilometres, 3,958.76 miles, and 3440.07 nautical miles. This final value is the distance between the two points.

For JFK and Sydney:

Distance = 2.5135 * 3,958.76 miles = 9,950.35 miles

#### Tips and warnings

• These computations for the great circle distance assume a spherical earth with a single radius, which is not entirely accurate. The earth is not a perfect sphere due to its rotation and gravitational forces; it is slightly wider at the equator than it is at the poles. However, the difference is small enough that it will not adversely affect most calculations, and many geographical applications consider this method of computing distance to be sufficient.

### Don't Miss

#### References

• All types
• Articles
• Slideshows
• Videos
##### Sort:
• Most relevant
• Most popular
• Most recent