I have to calculate distances between map points as开发者_如何学编程 part of a project I am doing. The map points are provided in OSGB36 co-ordinates, e.g. 508800 / 181100 (being easting and northing). I have come across many functions to calculate the distance between 2 lat / longs and so would like to convert to these using VBA within an MS Access database.
Does anyone know how I can do this?
Thanks, Steve
Rectilinear coordinates like this actually need nothing more than http://en.wikipedia.org/wiki/Pythagorean_theorem to calculate distances.
$d = sqrt(pow($e1-$e2,2)+pow($n1-$n2,2));
Where $d is the answer in meters. $e1,$n1 and $e2,$n2 are your easting/northings of the two points.
精彩评论