Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Cities are points x0,y0 and x1,y1 in kilometers or miles or Smoots[1]
- dx = x1 - x0;
- dy = y1 - y0;
- dist = sqrt(dx*dx + dy*y);
- dist = sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));
- SELECT geography::Point(lat1, lon1, 4326).STDistance(geography::Point(lat2, lon2, 4326))
- -- computes distance in meters using eliptical model, accurate to the mm
- dist = sqrt(dx*dx + dy*dy);
Add Comment
Please, Sign In to add comment