Automated edits/Latvia-bot/Addresses

From OpenStreetMap Wiki
Jump to navigation Jump to search

Operating principles

Addressing in Latvia is defined by the Regulation of the Cabinet of Ministers No. 455 of June 29, 2021 (in Latvian). Addresses are set by municipalities, but data managed in a centralized information system (State Address Register) by the State Land Service. Open data published by the State Land Service are authoritative, thus almost all existing OSM address data that differs is replaced/removed. From the State Address Register, only address data on buildings and land parcels intended for building are used to comply with existing global OSM principles (e.g. not adding address tags to places). Within the State Address Register, location of addresses of buildings and land parcels are defined by point coordinates. One coordinate pair exists per address even if it applies to multiple buildings. Addresses of all buildings and land parcels are defined in the State Immovable Property Cadastre Information System also managed by the State Land Service. Currently, only point based data from the State Address Register is used, although at a later stage it might be possible to set addresses for all buildings of certain type that imply and address (e.g., residential) by using open data of the State Immovable Property Cadastre Information System.

Address tags left untouched

addr:unit - in general, used for ways if building contains no more than one flat and address is assigned to more than one building or building part. Used also for row houses as nodes if building parts are not clearly distinguishable (e.g. https://www.openstreetmap.org/node/2423164378). Matches addresses of flats in the State Address Register but there is no information where flats are located within building.

For nodes only:

addr:door - used for numbers of flats. Used for businesses etc., thus depend on the address information given by them or survey.

addr:flats - used for the range of numbers of flats. Although in the State Address Register, data on addresses of flats is given, there is no information through which door each flat is accessible and where doors are located.

addr:floor - not part of the official addressing in Latvia. Keep because some businesses etc. use it.

Address tags used when adding data from the State Address Register

addr:city - towns, cities and villages.

addr:country - country.

addr:district - municipalities.

addr:housename - house names.

addr:housenumber - house numbers.

addr:postcode - postal codes.

addr:street - street names.

addr:subdistrict - rural territories.

ref:LV:addr - address code (unique ID (classifier code) in the State Address Register).

old_addr:housename - house name of the previous address where house name, house number or street name has been changed.

old_addr:housenumber - house number of the previous address where house name, house number or street name has been changed.

old_addr:street - street name of the previous address where house name, house number or street name has been changed.

Use of any other address tags or tags that resemble addresses is not accepted (such tags are removed by the bot), including noaddress and nohousenumber (all addresses have been added by the bot, thus it's irrelevant to tag buildings not having one). Name tags from buildings are also removed if they match housenumber or street + housenumber.

Assignment of address tags to elements

Address tags are assigned to elements in the following order (addresses assigned in previous steps are not assigned in the next ones anymore):

  1. Adding address for the closest isolated dwelling whose name matches and is located no more than 25 m from the address point. While data quality of isolated dwellings is being improved, assigning only to nodes that list the Place Names Database as source.
  2. Adding addresses for building polygons (both ways and relations). Polygon contains only one address point.
  3. Adding addresses for building polygons (both ways and relations). Polygon covers more than half of building polygon in cadastre containing address point from which the address is taken. To assign addresses for significantly misaligned polygons (e.g., digitized from satellite imagery).
  4. Adding addresses for address points (nodes containing only address tags).
    1. Address code matches (address points added previously).
    2. House names matches, distance up to 0.01 decimal degree (~1.1 km). To use already existing element in case address points were not added by the bot.
    3. House number and street matches, distance up to 0.01 decimal degree (~1.1 km). To use already existing element in case address points were not added by the bot.
    4. Insert missing addresses.

Beside buildings and address points, address tags are also assigned to objects listed in tags_4_addresses.csv (amenities, shops, offices etc.):

  1. Ways.
    1. Polygon contains only one address point.
    2. More than half of the polygon is covered with a building polygon in OSM having an address. Polygon doesn't contain any address points. Both ways and relations are considered as building polygons.
  2. Relations containing ways.
    1. Polygon contains only one address point.
    2. More than half of the polygon is covered with a building polygon in OSM having an address. Polygon doesn't contain any address points. Both ways and relations are considered as building polygons.
  3. Nodes.
    1. Address taken from the OSM building polygon (way or relation) where node is located. Node contained by only one polygon.
    2. Address taken from the address of the building from the State Immovable Property Cadastre Information System where node is located.
    3. Address taken from the address of the land parcel from the State Immovable Property Cadastre Information System where node is located.

Frequently asked questions

Why sometimes address points are located near a building instead of address tags being added to the building itself?

Screenshot of JOSM showing misaligned buildings in Krāslava on top of the LVM GEO orthophoto.
Misaligned buildings in Krāslava as of 10.12.2022. Basemap - LVM GEO orthophoto.

The most common cause is poor accuracy of the geometry of buildings, e.g., because they have been digitized from satellite imagery. To correct, move building (or align nodes of it if geometry is not precise enough) according to a better data source (e.g., orthophoto). The next time bot is run, address tags will be assigned to the building and removed from the address point deleting node if it had only address tags. Vice versa, if building is moved so that address point in the State Address Register is located outside of it or building covers less than half of building polygon in cadastre containing address point from which the address was taken, address tags from the building will be removed and a new node created at the location of the address point containing address tags.

Overlay of an orthophoto, cadastral map and OSM showing an example of a building polygon in cadastre containing an address point not located at the actual place.
Building polygon in cadastre (01000932044001) not located at the actual place. Dumbrāja iela 24A in Riga. LVM GEO WMS layers Orto_LKS and Kadastra_karte, OSM.

In some cases, building polygon in cadastre containing address point is not located at the actual place, e.g., The Church of Jesus Christ of Latter-day Saints in Riga (corresponding building in OSM) and Dumbrāja iela 24A, Rīga, LV-1067 (corresponding address point is OSM). While OSM building coverage and accuracy in Latvia is being improved, such cases are left intact. Do not manually add addresses to buildings and move address points as these changes will be altered by the bot.

Why multiple address points are located within one building?

Screenshot of OSM showing row houses in Salaspils digitized as one building instead of multiple ones.
Row houses in Salaspils digitized as one building instead of multiple ones as of 11.12.2022.

Most common cause is multiple buildings or building parts digitized as one building is OSM. To correct, either split building into multiple ones taking into account geometry of buildings in the cadastre (never blindly copy data from the cadastre, always compare with actual situation, e.g., orthophoto), or in case OSM buildings are actually buildings parts, change these to building:part and add an outline of the whole building as building.

As of December 2022, only less than 300 building polygons in cadastre contain multiple address points. If distinguishable, it's fine to create separate buildings in OSM (e.g., in case of garages). A few cases exist when one building has multiple addresses with different streets as per Section 23 of the Regulation of the Cabinet of Ministers No. 455 of June 29, 2021 (in Latvian), leave these as one building:

See also

  • Addresses#Latvia - introductory information about addressing in Latvia in OSM pointing to the bot.