Thunderstone Software Document Retreival and Management
Search:
Advanced Search
Home | Products | Company | News | Tech Support | Demos | Contact Us
Texis Manual

distgeocode

  distgeocode(geocode1, geocode2 [, method] )

The distgeocode function calculates the distance, in miles, between two given geocodes. It uses the ``Great Circle'' method for calculation by default, which is very accurate. A faster, but less accurate, calculation can be done with the Pythagorean theorem. It is not designed for distances on a sphere, however, and becomes somewhat inaccurate at larger distances and on paths that approach the poles. To use the Pythagorean theorem, pass a third string parameter, ``pythagorean'', to force that method. ``greatcircle'' can also be specified as a method.

For example:

  • New York (JFK) to Cleveland (CLE), the Pythagorean method is off by .8 miles (.1%)

  • New York (JFK) to Los Angeles (LAX), the Pythagorean method is off by 22.2 miles (.8%)

  • New York (JFK) to South Africa (PLZ), the Pythagorean method is off by 430 miles (5.2%)

EXAMPLE

For examples of using distgeocode, see the geocode script in the texis/samples directory.

SEE ALSO

For a very fast method that leverages geocodes for selecting cities within a certain radius, see the <code2geo> and <geo2code> functions in the Vortex manual.


Copyright © Thunderstone Software     Last updated: Wed Sep 10 11:42:21 EDT 2008
 
Home   ::   Products   ::   Company   ::   News   ::   Tech Support   ::   Demos   ::   Contact Us
Copyright © 2009 Thunderstone Software LLC. All rights reserved.