I am having a difficult time trying to figure out how to add feet to a latitude and longitude because I am very unfamiliar with lat and long coordinates. I have found several formulas to try and convert latitude and longitude to feet but I am not sure which ones are correct. For example, this website: http://www.colorado.edu/geography/gcraft/warmup/aquifer/html/distance.html I am not sure how to use or apply this method.

I have the latitude and longitude of two points and I want to be able to find the vector of the points. I believe I have to convert the latitude and longitude to feet in order for this to work. Can anyone please help me out in trying to figure this out?

  • $\begingroup$ "I want to be able to find the vector of the points." What do you mean by this? The vector connecting the two points? That would cut into the earth. $\endgroup$
    – Muphrid
    Commented Jun 28, 2013 at 19:05
  • $\begingroup$ Well I guess I mean to say I want to be able to find the distance between the two point but I really need to figure not only the hypotenuse but also the x and y components $\endgroup$ Commented Jun 28, 2013 at 19:44
  • $\begingroup$ The distance along the surface of the earth, or through the earth? $\endgroup$
    – Muphrid
    Commented Jun 28, 2013 at 19:48
  • $\begingroup$ Along the surface $\endgroup$ Commented Jul 1, 2013 at 2:55

1 Answer 1


You can use the results given in that website to good approximation as long as the distance between your two points is much less than the radius of the Earth.

If your two points are $A$ and $B$ and their latitudes and longitudes are $\lambda_A$, $\phi_A$, and $\lambda_B$, $\phi_B$ ($\lambda$ is lat, $\phi$ is lon) then the distance between them in latitude is 69.172mi $\times$ ($\lambda_B - \lambda_A$). (I am assuming $\phi_A$ and $\phi_B$ are in degrees.)

Distance in longitude is a bit more complicated. The latitudes $\lambda_A$ and $\lambda_B$ should not differ by very much. (Which is a consequence of what I said above, that the distance between the two points should be much smaller than the radius of the Earth.) If this is the case, we can settle on a "compromise" $\lambda_C = (\lambda_A+\lambda_B)/2$. Then, distance in longitude is

$69.172$ mi $\times \cos (\lambda_C) \times (\phi_B - \phi_A)$.

Again, I am assuming that all angle are in degrees. I am also assuming you will have a $\cos$ function that calculates in terms of degrees.

So now you have your distance in lat and your distance in lon, so there's your vector. If you calculate as I describe, your numbers will be in miles. To get feet, multiply them both by 5280 ft/mi.

  • $\begingroup$ So I have the points (30.619051,-96.338795) and (30.617973,-96.346413) and what you gave me is way to find the x and y distances between them? ill just use (x1,y1) (x2,y2) 69.1722(x2-x1) = -1.827667 is this in miles? and 69.1772((x2-x1)/2)*(y2-y2) = 1.454149 in miles? and then the magnitude of the vector is sqrt((-1.827667)^2 + (1.454149)^2) = 2.335576 is this miles and this is the distance correct? $\endgroup$ Commented Jun 28, 2013 at 18:49
  • $\begingroup$ when I use this site:andrew.hedges.name/experiments/haversine i get that the answer is 0.459 miles did I mess this up? $\endgroup$ Commented Jun 28, 2013 at 19:02
  • $\begingroup$ You didn't put a cosine factor in your longitude distance. $\endgroup$ Commented Jun 28, 2013 at 19:06
  • $\begingroup$ I computed the distance with the cos, I just forgot to type it up. The results are the same :/ is there anything else it could be? $\endgroup$ Commented Jun 28, 2013 at 19:46
  • $\begingroup$ Now that I look again, if 69.1772((x2-x1)/2)*(y2-y2) is supposed to equal 69.1772(cos(x2-x1)/2)*(y2-y2), then the argument of the cos should be (x2+x1)/2, not (x2-x1)/2. When I do this, I get a longitude distance of 0.4535mi. (Note, I get the value of the cos as 0.86058). Also, when I plug in the numbers for the latitudinal distance, I only get 0.07mi, instead 1.827667 mi. I've tried a few different things, but I don't see how you got that result. Sorry. $\endgroup$ Commented Jul 1, 2013 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .