PERGOLA LOGO

Geo

The pergola.geo object defines geographic utility functions.

pergola.geo

pergola.geo.distance(lat1, lon1, lat2, lon2)

Computes the distance in Kilometers between lat1,lon1 and lat2,lon2.

pergola.geo.kmToMi(d)

Converts d kilometers to miles.

pergola.geo.kmToNmi(d)

Converts d kilometers to nautical miles.

pergola.geo.formatMiles(l)

Formats l number to miles-feet-yards-inches depending on its magnitude. Returns a formatted string with the units that apply.

pergola.geo.formatKm(l)

Formats l number to kilometers-meters-centimeters depending on its magnitude. Returns a formatted string with the units that apply.