How can I find the smallest distance between two lines on Earth if I have their latitudes and longitudes? Preference to golang, but it'll be cool in an any programming language
I really tried to find it, but I can only find how to do it for two points
Get points http://turfjs.org/docs#explode and via http://turfjs.org/docs#coordEach find its distance to line http://turfjs.org/docs#pointToLineDistance
So, I do this I have two lines AB and CD I find distance from point A to line CD, from point C to CD, from point C to line AB, from point D to line AB Put it all into array and after than find the smallest distance
(if line lines do not intersect or parallel, i'll put this cases into special condition)