Minimum distance between a point and a line in latitude, longitude
I have a line with two points in latitude and longitude A: 3.222895, 101.719751 B: 3.227511, 101.724318 and 1 point C: 3.224972, 101.722932 How can I calculate minimum distance between point C and a line consists of point A and B? It will be convenient if you can provide the calculation and objective-c code too. The distance is around 89 meters (using ruler in Google Earth). Azam Thanks to mimi and this great article http://www.movable-type.co.uk/scripts/latlong.html but they don't give the whole picture. Here is a detail one. All this points are collected using Google Earth using Placemark to