|
Get 'Nearest' Data
The Nearest functions return information about the distance between a datum postcode and a single reference postcode or list of reference postcodes. Example: Use these functions as a 'Store Locator'. A user enters his/her postcode and is given information on the nearest store(s) to his/her location. The information returned includes distances measured in metres, kilometres, miles and nautical miles. If a list of check postcodes are being queried the Ordinal_Position field returns the closest postcode to the datum. 0 being the closest, 1 next closest, 2 next, etc. The List below describes the functions available:
| Function Name |
Function Description |
| DistanceBetween_Postcodes |
This function takes 5 parameters and returns a collection of Nearest objects. The 'Postcode Datum' parameter must be entered. The 'Postcode Check' parameter must be entered. (Either as a single postcode or list of postcodes separated by comma). The 'AccountName' parameter must be entered. The 'LicenceID' parameter must be entered. Leave 'MachineID' blank. |
| DistanceBetween_Postcodes_Dataset |
This search is the same as DistanceBetween_Postcodes but returns the data as a PostcodeUtilities dataset with a populated Nearest table. |
| NearestData_ForPostcode |
This function takes 7 parameters and returns a collection of Nearest objects. The 'Postcode Datum' parameter must be entered. The 'Postcode Check' parameter must be entered. (Either as a single postcode or list of postcodes separated by comma). The 'Postcode Descriptions' parameter is optional, this is a meaningful description for the postcode entered. (If this parameter is entered it must have the same number of entries as the 'Postcode Check' field otherwise a 301 error will be returned). The 'Number to Return' parameter is optional. If this is left blank only 1 nearest record will be returned. Otherwise enter the number of records you want returned. The 'AccountName' parameter must be entered. The 'LicenceID' parameter must be entered. Leave 'MachineID' blank.
e.g. PostcodeDatum='G52 4BN' PostcodeCheck='G99 1AA,ML77 5GG,HA56 6TT' PostcodeDescriptions='Head Office,Sales Office,Depot' NumberToReturn='2'
This will return the 2 nearest records for the 2 closest Postcodes in the PostcodeCheck fileld to the PostcodeDatum. |
| NearestData_ForPostcode_Dataset |
This search is the same as NearestData_ForPostcode but returns the data as a PostcodeUtilities dataset with a populated Nearest table. | A formal description of the services can be found in the 'Service Description' section of
The response to a call of the above functions returns a collection of Nearest objects either as a dataset or List depending on the method invoked.
|