distgeocode(geocode1, geocode2 [, method] )
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. "
can also be specified as a method.
For examples of using
distgeocode, see the
script in the
For a very fast method that leverages geocodes for selecting cities
within a certain radius, see the
functions in the Vortex manual.