I am trying to find out nearest airport code using latitude and longitude. I find URL which give me nearest airport:
http://airports.pidgets.com/v1/airports?near=40.1584,-74.9732
but problem is that this URL give 8 airports codes. How can i find out nearest airport within this 8 airports code.
Any suggestion.
The <dist> is included, and appears to be in ascending order. So: take the first.
If you don't trust it, compute the great arc distance ;p
The resulting XML gives you a <dist> node which appears to give you the distance. So just take the one with the lowest <dist> value (seems to be ordered, so take the first).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With