API description (REST)
This service offers a Geocoding API for geocoding and reverse geocoding using different data sources like geographic names, interpolated road addresses, cadastral units and map sheets provided by the National Land Survey of Finland. Also building addresses from the Finnish Population Information System are used.
The API description of the service as Open API 3.0 document is available at:
https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/openapi.json
The API is based on the subset of the Pelias API specification with some modifications (for example coordinate system and language parameters). Responses are formatted as GeoJSON data with extensions.
The service supports ETRS-TM35FIN (EPSG:3067) coordinate system for all data sources the service is using and providing. There is also a partial support for WGS84 geographic coordinates (EPSG:4326) for some data sources.
This service is provided as an open interface with API-key authentication and as a contract based interface with http basic authentication
Sources and products
The Geocoding API uses geospatial feature data accessed from different data sources:
Data source |
Example queries |
Source id |
Source product information |
---|---|---|---|
Geographic names | search | geographic-names | Geographic Names Register |
Building addresses | search | addresses | Building information of the Population Information System |
Interpolated road addresses | search | interpolated-road-addresses | Topographic Database (interpolated road addresses are part of this database) |
Map sheets (TM35) | search | mapsheets-tm35 | JHS 197 national recommendation (in Finnish) |
Cadastral units | search | cadastral-units | Cadastral index map |
The service uses these data sources as back-end services when processing either forward or reverse geocoding API operations. Data sources return place names, addresses or other geospatial features that may have different set of properties and different data structures. The Geocoding Service uses relevant properties of data source feature types as filter parameters. Response data varies depending on data sources of matched features.
Operations supported by the API:
Operation |
Path |
Description |
---|---|---|
Forward geocoding | /geocoding/v1/pelias/search | Find a location with geographic coordinates by matching place names, addresses or other geospatial features of data sources with a search text or term. |
Reverse geocoding | /geocoding/v1/pelias/reverse | Find a place name, an address or other geospatial feature located on given coordinates or nearby. |
Decode text | /geocoding/v1/searchterm/decode | Match a text string with descriptions of code list values (accessed from a catalogue service), and if matched, then decode such description to a code value. |
Similar terms | /geocoding/v1/searchterm/similar | Match a text string with place names and return a list of similar place names. |
Please see Pelias API documentation for background information about:
Features and filter parameters supported by this service are listed on the Open API 3.0 description (link at the beginning of this page).
Queries and examples
Forward geocoding
Note! The use of the example links below requires the use of an API-key.
A basic template for finding a location using a search term:
/geocoding/v1/pelias/search?text=...&sources=...&crs=...&lang=...
Responses are formatted as extended GeoJSON FeatureCollection.
Example queries to search by a place name with optional additional search terms:
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=tammerkoski&sources=geographic-names&crs=EPSG:3067&lang=fi
- A place name "Tammerkoski"
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=pasila%20isojoki&sources=geographic-names&crs=EPSG:3067&lang=fi
- A place name "Pasila" in the municipality of Isojoki
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=hossa%20suomussalmi%20kansallispuisto&sources=geographic-names&crs=EPSG:3067&lang=fi
- A place name "Hossa" that is a national park ("kansallispuisto") in the municipality of Suomussalmi
Previous examples returned matched locations as ETRS-TM35FIN coordinates. WGS 84 geographic coordinates on responses can be requested by omitting crs parameter or by asking for crs=EPSG:4326.
Following examples matching locations from other data sources than place names however works only using ETRS-TM35FIN coordinates. These examples also require defining which data sources should be queried, so sources parameter is required.
Map sheets (TM35)
Interpolated road addresses (here searching for "Mannerheimintie 3 Helsinki" or "Mannerheimvägen 3 Helsingfors"):
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=Mannerheimintie%203%20Helsinki&sources=interpolated-road-addresses&crs=EPSG:3067&lang=fi
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=Mannerheimvägen%203%20Helsingfors&sources=interpolated-road-addresses&crs=EPSG:3067&lang=sv
Same queries but now using building addresses:
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=Mannerheimintie%203%20Helsinki&sources=addresses&crs=EPSG:3067&lang=fi
- https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/pelias/search?text=Mannerheimvägen%203%20Helsingfors&sources=addresses&crs=EPSG:3067&lang=sv
It's recommended to URL encode text parameter, for example to search for "Pohjoinen Makasiinikatu" in Helsinki from building addresses:
A street number can be added to the request in this way:
Reverse geocoding
Reverse geocoding is used for finding nearest features at a given location. Responses are formatted as extended GeoJSON FeatureCollection.
For example to find nearest building addresses nearby a location a following query can be used:
In a specific case where the information of a parcel based on an exact position is the object of interest, the parameter boundary.circle.radius shoul be given a value of 0:
Decode text
A template for decoding text (matching code list value descriptions and converting them to code values):
/geocoding/v1/pelias/searchterm/decode?text=...
Responses are formatted as extended GeoJSON FeatureCollection.
For example a search term "helsinki" matches with information from subregion and municipality code lists:
https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/searchterm/decode?text=helsinki
Or a Finnish text "museo" is matched with a place type code used to classify museums:
https://avoin-paikkatieto.maanmittauslaitos.fi/geocoding/v1/searchterm/decode?text=museo
There can be many terms separated by encoded space char. The following example searches for "jyrä", "Heinola" and "koski" resulting with multiple matches for different code lists:
The service matches search terms with region, placetype, placetypegroup, placetypecategory and municipality code lists. Please see index page of the catalogue service for more information.
Similar terms
A template for similar terms (place names) for text input:
/geocoding/v1/pelias/searchterm/similar?size=...&text=...
For example this query find 10 similar terms for text input "mäntyk":
Version management
BETA-release 2019-03.
Productional release 2020-02.