0

This is the lat/long for Philadelphia: http://www.rcn.montana.edu/resources/tools/coordinates.aspx?nav=11&c=DD&md=24&mdt=International(1924)-Hayford(1909)&lat=39.947648&lath=N&lon=-75.151978&lonh=W

This is the lat/long for Boulder: http://www.rcn.montana.edu/resources/tools/coordinates.aspx?nav=11&c=DD&md=24&mdt=International(1924)-Hayford(1909)&lat=40.0149856&lath=N&lon=-105.2705456&lonh=W

That lat and long are correct (You can check it in Google Maps). UTM_east and UTM_north are also correct for both.

Now, plug the UTMs into the distance formula here: http://www.basic-mathematics.com/distance-formula-calculator.html

And you will get distance in meters, which is 7 miles.

Why on earth is Boulder 7 miles away from Philadelphia?

Boris Gorelik
  • 29,945
  • 39
  • 128
  • 170
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080

3 Answers3

3

You can't just plug in the UTM coordinates like that because these two cities are not in the same UTM Zone.

EDIT:

And, as everyone else has pointed out, even if they were in the same zone, you shouldn't just apply a planar, cartesian distance calculation to the UTM coordinates because the UTM coordinates are based on a cylindrical projection. I was just pointing out that the largest contributing factor to your error was the zone issue.

mhum
  • 2,928
  • 1
  • 16
  • 11
  • And even if they were, using cartesian distance in a UTM zone still won't give you a correct answer as that projection isn't good enough for that type of calculation. You will need to use an angular method, like suggested in other comments. – Niklas Wulff Mar 09 '11 at 12:18
  • @Niklas: Also very true. However, the errors you get between spherical vs. planar coordinates are usually not of this magnitude. – mhum Mar 09 '11 at 15:44
0

Latitude and Longitude are a spherical coordinate system and the formula you're using only works on a plane. You need to use the haversine formula.

mattexx
  • 6,456
  • 3
  • 36
  • 47
  • @TIMEX Probably because UTMs are on different grids. You would have to add in the missing grids. Sorry I've never used UTM before. – mattexx Mar 08 '11 at 05:33
0

When I calculate the distance between the two points as if they were on a standard Cartesian plane, I get a distance of 29.9, which is really close to the tool's result:

The distance between these two points is 29.900202340452488

First, using a Cartesian distance calculator on a spherical object isn't going to give good results. :) (Leaving aside that the Earth isn't spherical, but it sure isn't flat either.)

BUT, let's assume for a second that using Cartesian distance is "good enough", the results here are measured in whatever units we input. And knowing that 1 degree is roughly 111 km, we get a quick guess that the distance between Boulder and Philadelphia is roughly 3318.9 km. Given that Google's driving directions between the two is roughly 2841 km, you can immediately see why applying Cartesian distance algorithms won't work on a sphere, and why you need to use the haversine formula.

Community
  • 1
  • 1
sarnold
  • 102,305
  • 22
  • 181
  • 238
  • Probably the best UTM can do is _approximate_ flat for small 6 degree x 6 degree sections of the sphere. Whether or not this approximation is "good enough" depends upon how the data is used: driving distances, fine, but I wouldn't want to use it for artillery tables or autopilot landing systems. – sarnold Mar 08 '11 at 05:56