Brian Dunning's FileMaker Custom Functions

LatLongDist ( Lat1 ; Long1 ; Lat2 ; Long2 )

Calculates the distance between two sets of latitude/longitude coordinates

  Average rating: 4.5 (31 votes) Log in to vote

George Nassar   George Nassar
Provident Data Services

Share on Facebook Share on Twitter

  Sample input:
LatLongDist ( -97.146517, 33.231477, -97.325295; 32.785130 )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This requires the use of another custom function, Acos:

Case ( num>0 ; Atan ( Sqrt(1-num*num) / num ) ; num<0 ; Pi + Atan ( Sqrt(1-num*num) / num ) ; Pi/2 )

which takes the single parameter "num"

You can use a web service to automatically import the long/lat of an address using XML for a specific address, and then calculate distances in miles with this custom function. If you are interested in our perl script which facilitates this import contact us.



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.