Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

DistanceGeoCoord ( Lat1deg ; Lat1mm ; Lat1ss ; Lon1deg ; Lon1mm ; Lon1ss ; Lat2deg ; Lat2mm ; Lat2ss ; Lon2deg ; Lon2mm ; Lon2ss ; U ; Version )

Rate this function:  

  Average rating: 4.4  (36 votes)
  Discuss this Custom Function

Edward_Souza, n/a

Measure the distance between two geographic coordinates

Sample Input:
DistanceGeoCoord ( 50 ; 6 ; 44 ; 8 ; 44 ; 5 ; 52 ; 31 ; 20 ; 13 ; 17 ; 51 ; Km ; Radial )
Sample Output:
/* Distance between Frankfurt and Berlin

(If "U" = Km) 418.34
(If "U" = Mi) 259.95

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


This is a rather complete and flexible custom function on measuring linear distances between two geographic coordinates, for it allows the user/developer to insert coordinate values in DMS (Degrees, Minutes, and Seconds) and DD (Decimal Degrees). Yet, it goes a bit further on flexibility , for it permits the calculation of angle functions either in Degrees or Radians.
The function itself is quite straightforward and easy to understand. Please refer to the text in the beginning and inside-function notes for deeper information.

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

This is my Custom Function and I want to edit it


hello, edward,

this is nice function. thanks for sharing it.
i would like to know how to add different measures in this function, and how to do it.
thank you, jean

Gil Jean, Paris Fr
February 26, 2010 8:34am

Salut, Gil Jean,

Let us say you need to measure the linear distance between two coordinates in inches. The first thing to do give this unit a "name" or an acronym (for the sake of an example, let us call it "In") then include it plus the radius of earth on the Equator (which, by my calculations, is 251107782.481124 inches) to the "R" variables.
When done, "R" shall look like this:
R =
U = "Km"; 6378.137; // radius of the earth in kilometers
U = "m"; 6378137; // radius of the earth in meters
U = "Mi"; 3963.191; // radius of the earth in statute miles
U = "NMi"; 3437.74677; // radius of the earth in nautical miles
U = "In"; 251107782.481124 // radius of the earth in inches
The next step is to include "In" to the validation parameter below "R". This would then look like this:
//If you added a new value, place its acronym here as well
IsEmpty( U ) or ( U ≠ "Km" and U ≠ "m" and U ≠ "Mi" and U ≠ "NMi" and U ≠ "In" );
"Error - Missing (or Wrong) Unit";
That's this simple. I hope I could've been of any help.

Edward Souza, Sao Paulo, Brazil
February 26, 2010 2:29pm

Hello Edward,

What is the difference between the 2 parameter "Version": Radians or Degrees.

What do you mean by "isolate or not the



Ben, Belgium
March 07, 2010 4:38am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 7 + 6 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions