Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


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:  

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

Edward_Souza, n/a
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.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

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 BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

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 =
Case(
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

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
coordinates"?

Thanks

Ben

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:
City/Location:
Comment:
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 5 + 2 =
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. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions