Locate Address Results (Deprecated)

This macro has been deprecated. Please use Data.Finder Class and Data.Geocoder Class

Summary

Finds the location of a single address and returns an array that, if an exact match has not been found for the input address, includes an array of partial match results listing geocoding scores and street segment information.

Syntax

result = RunMacro("GISDK Locate Address Results", string address, integer|array zips, string street_layer, string callback_flag, int num_results, int threshold_pct, string rule_file)

Argument Contents
address The street address to locate: either a house number and street name, or two street names separated by "and"
zips The ZIP Code(s) of the address to locate; can be one integer value, or an array of ZIP Code values
street_layer The name of the Streets layer to search
callback_flag Any non-null value
num_results Maximum number of partial matches for which to return results
threshold_pct Determines the lowest score, relative to high score, for which results will be returned, up to num_results; for example, if this argument is 70, and the best partial match has a score of 10.0, then no partial match with a score below 7.0 will be listed
rule_file Optional country-specific rule file, or null to use the default American/Canadian rule file

Return Value

A three element array:

Element Type Contents
1 String If null, the address was found successfully, otherwise the string "no exact match found" when some partial matches were found.
2 Coord The location of the address, if the status message is null, or the location of the algorithmically determined best partial match, if the status message is non-null.
3 Array An array with information about the location(s) found. If an exact match, this array will have one element; otherwise it will have up to num_results elements, depending on the relative score threshold set by threshold_pct. Each element is itself an array of three elements, as follows:
Match Element Type Contents
1 Real Geocoding score, with 1000 representing an exact match; a score of eleven or above is a very close match, e.g. "Elm Dr" for "Elm Ln" in the same ZIP Code
2 Array Street segment information; see below
3 String String representation of street segment information
Street Segment Element Type Contents
1 Int ZIP Code
2 String Street name
3 String Alternate name
4 Int Start address for left side
5 Int End address for left side
6 Int Start address for right side
7 Int End address for right side
8 Int Parity flag
9 Int Street segment ID

Notes

  • In Caliper Script, you must set the Geocode UI to be the alternate interface by calling SetAlternateInterface("geocode") before running this macro. When calling these macros from VBScript, add "geocode" after the macro name and before the first argument.

  • ZIP Code values in an array can be numeric, or strings that can be parsed as numbers.

  • The array of ZIP Codes is searched until a match is found.

  • For faster response, use a compact (.cdf) Streets file for street_layer.

  • The callback_flag argument must be null in VBScript.

  • If rule_file is null, it is assumed the address has the format of an American or Canadian address, such as: "123 Main Street." Otherwise, you can specify the following rule files, which are shipped with the geocode UI and are located in the program folder:

  • caliper1.rul: U.S. addresses with hyphenated numbers str_num.rul: Street followed by number (e.g., "Via Nazionale 123") num_str.rul: Number followed by street, with no American abbreviations