Spain (ESP)

This section defines the supported geocoding datasets, operations, and input and output field information for Spain.

Supported Geocoding Datasets

The following table lists the supported geocoding dataset(s) with the available geocoding levels for Spain.

Note: Custom User Dictionaries are supported.
Geocoding Dataset City Centroid Suburb/Village Centroid Postal Centroid Street Centroid Interpolated Street Address Point-level Address Point of Interest
TomTom Streets English, Spanish, Basque, Catalan Yes Yes Yes Yes Yes No No
TomTom Points Yes Yes Yes Yes Yes Yes No
HERE Points Yes Yes Yes Yes Yes Yes No

Supported Operations

The following operations are supported for Spain:
  • 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.
  • Interactive Geocoding— Returns potential match candidates as the adddress is typed in.
  • Global Key Lookup—Returns geocode candidates when given a unique key as input. USA MLD and AUS GNAF data only.

Input Fields

The input address may contain some or all of the following address elements.

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:

Calle de Mesena, 77
28033 Madrid

areaName1 String Specifies the region. Optional.
areaName2 String Specifies the province. Optional.
areaName3 String Specifies the city or town. The input can be the official city name or alias. The alias can be either a local alternative name or a language alternative (Basque or Catalan). The city name returned will match the name specified in the input. Optional.
areaName4 String Specifies the locality. Optional.
postalCode String Specifies the 5-digit postal code. Optional.
country String The three-letter ISO 3166-1 Alpha-3 country code. For Spain, the country code is ESP. Required for forward geocoding.

Address Guidelines for Spain

Follow these suggestions to ensure that your input address data is in the best format possible for optimum matching and geocoding. For additional information about the Spain postal system, see the Spanish postal service website: www.correos.es.

  • Required fields—Addresses must contain either a city or a postal code.
  • Supported languages—If a street has a Spanish name and Basque or Catalan alternate name, the returned candidate street name will match the input. That is, if a Basque or Catalan street name is used on input, then the Basque or Catalan alternate street name is returned as a close match candidate. If the Spanish street name is input, the Spanish street name is returned.
  • Abbreviations in addresses—The geocoder handles common abbreviations that are used in Spanish addresses. This includes abbreviations for building types, floor indicators, titles, and articles of speech. The geocoder also supports all the official Spanish street type abbreviations plus a number of unofficial street types to help improve geocoding efficiency. Abbreviated street directionals are also handled on input and the returned candidate displays the complete directional. For example, input of Arroya Guadalpia N returns the street Arroya Guadalpia Norte.

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:

[street_info][address_number][postal_code][area]

Where:
  • [street_info] consists of the street name, street type and any pre- or post-directional information (e.g. East, West, etc.). Optional.
  • [address_number] is optional.
  • [postal_code] is the postal code.
  • [area] is the city only, or city plus supporting information, such as state, province, locality.
  • Either the [area] or [postal_code] is required.

For best results, put a comma between the street information and the last address line information.

Custom Options

There are no options specific to Spain.

Output Fields

The following table lists the address fields returned for a candidate located in Spain.

Note: The placeName, addressNumber, unitType and unitValue field values are only returned when a geocoding dataset that supports street address interpolation is installed.
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 region.
areaName2 The province.
areaName3 The city or town.
areaName4 The locality.
postCode1 The 5-digit postal code.
postCode2 Not used.
country The three-letter ISO 3166-1 Alpha-3 country code. For Spain, the country code is ESP.
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 Spain does not have any custom output fields.