Download CUT (Crystal UTilities) Documentation

Transcript
Geo
Distance()
Arguments: (lat1, lon1, lat2, lon2, unit_of_measure)
lat1, lon1 are the latitude and longitude of point 1 (in decimal degrees)
lat2, lon2 are the latitude and longitude of point 2 (in decimal degrees)
unit_of_measure is how the result should be provided:
‘m’ for miles, ‘k’ for kilometers, ‘n’ for nautical miles
This function calculates the distance between two points (given the latitude/longitude of
those points). Note that south latitudes are negative, east longitudes are positive.
Returns: Distance in the requested units of measure.
Example: Distance (52.2047, 0.1406 , 53.2047 , 0.1406, "m") returns 69.09
DistanceByZip5()
Arguments: (Zip1, Zip2, unit_of_measure)
Zip1 and Zip2 are the Canadian or 5-digit US zip code of the two points (e.g.,
“M1B0A9” and “16509”) unit_of_measure is how the result should be provided:
‘m’ for miles, ‘k’ for kilometers, ‘n’ for nautical miles
Returns: Distance in the requested units of measure.
Example: DistanceByZip5 ("16509", "M1B 0A9", 'm') returns 4.76 miles
Note: this function requires that the CUT_Light.ini file is installed to the default location of:
c:\Program Files\CUT Light\ Or c:\Program Files (x86)\CUT Light\
Since it uses a local ini file, it doesn’t depend on a web connection and quota restrictions
imposed by DistanceByZip().
DistanceByZipUK()
Arguments: (Zip1, Zip2, unit_of_measure)
Zip1 and Zip2 are the UK Outer Codes of the two points (e.g., “AB16” and “AB30”)
unit_of_measure is how the result should be provided:
‘m’ for miles, ‘k’ for kilometers, ‘n’ for nautical miles
Returns: Distance in the requested units of measure.
Example: DistanceByZipUK(“AB16”, “AB30, "k") returns 48.92 Kilometers
Note: this function requires that the CUT_Light.ini file is installed to the default location of:
c:\Program Files\CUT Light\ Or c:\Program Files (x86)\CUT Light\
Since it uses a local ini file, it doesn’t depend on a web connection and quota restrictions
imposed by DistanceByZip().
©2002-2015, Ido Millet, [email protected]
Page 39