Canada (CAN)
This chapter defines the supported Geocode datasets, operations, and input and output field information for Canada.
Supported Geocode Datasets
The following table lists the supported Geocode dataset(s) with the available geocoding levels for Canada.
Geocode Dataset | Maximum Precision | Postcodes | Language | Geocode Level |
---|---|---|---|---|
TomTom | Street Interpolated | Yes |
English, French |
Premium & Advanced |
Precisely | Address Points | Yes | English | Premium |
- Statistics Canada PCCF (Postal Codes) and FSA Boundaries
- Canada Post Address Range Data
Supported Operations
The following operations are supported for Canada:
- Geocoding—Takes one or more addresses as input and returns latitude/longitude coordinates and other information.
- Reverse Geocoding—Takes one or more latitude and longitude coordinates as input and returns the address of the location.
Input Fields
Canadian addresses may contain some or all of the following address elements.
Field Name Parameter | Type | Description |
---|---|---|
placeName | String | Specifies the building name, place name, Point of Interest (POI), company or firm name associated with the input address. Optional. |
mainAddress | String |
Single Line Input—If no other address field is populated, then the
mainAddress entry will be treated as a single line input.
Single line input can consist of multiple input address fields; these should be
entered in the typical address order for the country. For more details, refer to the
section "Single Line Input" below. Street Address—If the post address components (city, postalCode, etc.) are provided separately or in the lastLine field, then the contents of mainAddress will be treated as the street address part and can include company name, house number, building names and street names. Optional. Street Intersection Input—To enter an intersection, specify the two street names separated by a double ampersand (&&). |
lastLine | String | The last line of the address. Optional. For example:
5500 Explorer Drive |
areaName1 | String | Specifies the province. If a postal code is included in the input address, this field is optional. Without a postal code, you must enter both the province and city in order to geocode. |
areaName2 | String | Not used. |
areaName3 | String | Specifies the city or town name. If a postal code is included in the input address, this field is optional. Without a postal code, you must enter both the province and city in order to geocode. |
areaName4 | String | Specifies the Dissemination Area and Enumeration Area (DA and EA). Optional. |
postalCode | String | Canada uses a six-character postal code. The first three characters are typically separated from the second three with a space. The first three characters are the FSA, the second three are the LDU. Street address geocoding only requires the FSA while postal code geocoding requires the full postal code (FSALDU). Choose whether you wish to have a space between the first three and last three characters of the postal code. Keeping this consistent speeds up the geocoding process. Optional. |
country | String | ISO 3166-1 Alpha-3 country code or country name. For Canada, the country code is CAN. Required for forward geocoding. |
Address Guidelines for Canada
Follow these suggestions to ensure that your street input data is in the best format possible for optimum matching and geocoding.
- Post Office Box numbers—P.O. Boxes and Rural Route addresses are not geocodable. This user input will be honored and an attempt is made to output Boxes and Rural Route information, but it will not be used for geocoding purposes.
- Highway addresses—Highway addresses (such as Hwy 401) are geocoded.
- House numbers and apartment letters—Remove spaces between house number and apartment letter. 123 A Main Street does not geocode correctly because the geocoder assumes that the name of the street is A. Two workaround options are available: either do not include the apartment letter or delete the space between the house number and apartment letter.
-
House numbers and unit information—The house number pinpoints the location
of the address. Unit input can be in one of two formats, as shown in the following
examples:
- 99-123 Main St, where 99 is the unit number. In this format, do not specify the unit type. The number 99 could be a suite, apartment, unit, floor or any valid unit type.
- 123 Main St. Apt 99, where Apt is the unit type and 99 is the unit number. In this format, you must specify a valid unit type (such as Apt or Suite), otherwise the address will not be geocoded correctly. - Directional suffixes—Use directional suffixes wherever possible. This is especially true in towns and cities, such as Calgary, which consist mainly of numbered streets. These streets can only be distinguished by their directional suffixes and street types. They also distinguish addresses on streets that change direction. For example: 123 Main St W and 123 Main St E have very different coordinates.
- Street types—These distinguish different streets of the same name. For example, Main Avenue and Main Street are two entirely different entities. Using types is not essential, but it adds precision to your data. For a list of valid street types see www.canadapost.com.
- City name—Do not abbreviate city names. If the city is unknown, you may leave it blank, although this may affect the accuracy of the geocode.
- Province name—You may use the full province name (for example, Ontario), but using the two-character abbreviation (ON) is recommended to reduce the likelihood of input errors. Without a postcode, you must enter both the province and city in order to geocode.
Single Line Input
Instead of entering each address component in separate fields, you can enter the entire address in the mainAddress input field with the address elements ordered as follows:
[address_number][street_info][area_name_3][area_name_1][post_code_1][post_code_2]
- [address_number] is optional.
- [street_info] consists of the street name, street type and any unit type, unit value or pre- or post-directional information (e.g. East, West, etc.).
- [area_name_3] is the city or town.
- [area_name_1] is the province.
- [postal_code_1] is the FSA portion of the postal code.
- [postal_code_2] is the LDU portion of the postal code.
For best results, put a comma between street information and the lastline (e.g. city and postal) information.
Custom Options
The following table lists the options that are unique to Canada. These custom options are optional input parameters, and unless otherwise noted, they are available for both Geocoding and Reverse Geocoding.
Option Name | Description |
---|---|
Force LDU match | When enabled, does not return any matches that do not have the full FSA LDU postal code. Default = disabled. |
KEY_MUST_HAVE_LDU | When true, does not return any matches that do not have the full FSA LDU postal code. Default = false. |
USE_ADDRESS_POINT_INTERPOLATION | When set to true, enables address point interpolation. Default = false.
Supported in forward geocoding only. Note: The address point interpolation feature
requires that you have a point-level geocoding dataset installed. |
USE_CENTERLINE_OFFSET | When set to true, calculates the centerline offset for point addresses. Default =
false. Supported in forward geocoding only. Note: The centerline feature requires
that you have a point-level geocoding dataset installed. A centerline point
match is indicated by a result code beginning with SC. |
CENTERLINE_OFFSET | When USE_CENTERLINE_OFFSET is enabled, this specifies the distance to offset the point from centerline. Default = 0. Supported in forward geocoding only. |
CENTERLINE_OFFSET_UNIT | When USE_CENTERLINE_OFFSET is enabled, this specifies the unit type for the centerline offset. Valid values = feet, meters. Default = meters. Supported in forward geocoding only. |
Parsed Address Output Fields
The following table lists the parsed address fields returned for a candidate located in Canada.
Field Name | Description |
---|---|
mainAddressLine | The street address which may include company name, house number, building names and street names. |
addressLastLine | The last line of the address. |
placeName | The building name, place name, Point of Interest (POI), company or firm name associated with the address. |
areaName1 | The province. |
areaName2 | Not used. |
areaName3 | The town or city. |
areaName4 | The Dissemination Area and Enumeration Area (DA and EA). |
postCode1 | The FSA portion of the postal code. |
postCode2 | The LDU portion of the postal code. |
country | The three-letter ISO 3166-1 Alpha-3 country code. For Canada, the country code is CAN. |
addressNumber | The address number. |
streetName | The street or road name. |
unitType | The unit type such as APT, STE, etc. |
unitValue | The unit value/number, such as "3B". |
customFields | See the following section for the custom field definitions. |
Custom Output Fields
The following table lists the output fields that are unique for Canada. Unless otherwise noted, these fields can be returned for both forward and reverse geocoding.
Field Name | Description |
---|---|
CENSUS_CD CAN.Census CD | The Census Division (CD) in which the address is located. |
CENSUS_CMA CAN.Census CMA | The Census Metropolitan Area (CMA) in which the address is located. |
CENSUS_CSD CAN.Census CSD | The Census Subdivision (CSD) in which the address is located. |
CENSUS_CT CAN.Census CT | The Census Tract (CT) in which the address is located. |
CENSUS_DA CAN.Census DA | The Dissemination Area (DA) in which the address is located. |
FORMATTED_STREET_RANGE CAN.Formatted Street Range | The formatted range data for the address. This field is only returned for postal centroid candidates. |