After finishing the app, if I try to execute the app it will return the 10-closest airports to me:
After having the data, I needed to re-format it in order to be imported by MongoDB. The most important part was to transform the given latitude and longitude to a GeoJson Point format.
MongoDB geo-function $near returns the a sorted list of the closest locations (stored documents) to a given location. But, to take advantage of this functionality a geo-index is needed:
I would like to thank Openflights again. Without their data, this PoC would not have been possible.
The app should be running in http://airports-dollbox.rhcloud.com/.
This project is in github.