From OpenStreetMap Wiki
Jump to: navigation, search

Digitransit project OpenStreetMap (OSM) related information is being collected to this page. This documentation is currently being created to help editing OpenStreetMap to support routing and geocoding (address search) and also understanding these issues specially out of Digitransit's perspective. Notice that when you edit OpenStreetMap, even though your edits are saved immediately to the OpenStreetMap, it can take over a week before your edits have effect to the Digitransit routing. This documentation should not be considered as the de facto way to do things. Also, notice that different countries have some differences in tagging and other mapping practices.

Learning to map

The following sections have various tasks for those interested to improve OpenStreetMap and Digitransit routing or geocoding. The assumption is that you have learned the basics of the OpenStreetMap mapping before doing the following tasks. You can learn about OpenStreetMap and mapping, for example, via Learn OpenStreetMap Step by Step guide by HOT OSM or Learn to map guide by MapGive. If you like, you can also join various OpenStreetMap community events that are advertised, for example, in the OpenStreetMap Finland Facebook group.

Adding your home building(s)

Easy task

Especially, if you are not living in a city it is possible that your home building has not yet been added to OSM.

The Bing aerial imagery shown by default in the iD editor will probably show the location of the house, but if not, then you can also try other base layers, such as, orthographic imagery from NLS Finland that is easily available from kartat.kapsi.fi as TMS-layer (http://tiles.kartat.kapsi.fi/ortokuva/{zoom}/{x}/{y}.jpg).

You should draw the contours of the building and choose the correct building type from the left side menu in the iD-editor.

You can also add address information. Add the addr:housenumber=* and addr:street=* tags for the building(s). You can also add other information and tags such as node(s) for the building entrance(s) and tag it with the entrance=* as well as with the addr:unit=*. The entrance=* and addr:unit=* tags are not currently used as nodes in routing (unless the interior of the building has been mapped with ways, eg. large shopping centers) but they can be otherwise useful to you and other people.


Adding roads and paths

Easy task

It is also very possible that your home road has not been added yet. To enable routing to the very next to your home, you can add road leading to your home to OpenStreetMap.

The countryside in Finland is missing many minor roads, not to speak about the tracks and paths. In cities, almost all roads and even paths have already been added but there can always be something to edit.

Way(s) should be drawn where the road is. You can use the base maps from kartat.kapsi.fi mentioned in the previous section to see locations of the roads. See highway=* and the highways page on how roads and paths should be tagged.

See also:

Road name tagging

Easy task

In Finland quite many roads have the name=* but Swedish names are missing, so name:sv=* could be added. If the name:fi=* is missing then that can, of course, also be added. The name=* should reflect the name in the major language in each municipality so the language of this tag may vary in different parts of Finland.

See also:

Roundabout tagging

Easy task

To prevent pedestrian routing via a roundabout you should add foot=no to it. For example, this roundabout part (and rest of it) has the tag. However, note that not all roundabouts should have the foot=no added to it. In Finland pedestrians and cyclist are not allowed to use the roundabout if they have their own paths at the junction that have been indicated by the traffic signs[1].

There are also many roundabouts that have not been tagged with the junction=roundabout, so if you are editing one is missing tag(s) then it is a good idea to add this tag also. Finally, if applicable, also the bicycle=use_sidepath tag could be added or the bicycle=no tag if there is a traffic sign that explicitly forbids cycling.

Construction work

Easy task

If a construction work is blocking access via a road, then you should:

  1. add construction=* tag
  2. give the current value of the highway=* for the construction=*
  3. change the value of the highway=* to highway=construction

Of course, after the construction work has finished and the road is opened, you should change the value of the highway=* back to the original and remove the construction=* tag.

If the construction work is minor and not blocking access, then you should not change the value of the highway=* but just add construction=minor.

See also:

Road access tagging

Intermediate task

You are strongly suggested to also read the Key:access page.

To prevent routing via a road you should add access=no tag or access=private tag to it. access=yes is the default for highways in OpenStreetMap and does not need to be added. For example, this service road at the Helsinki-Vantaa airport has access=private tag.

If the access restriction is specific for the pedestrians then add the foot=no tag to it. Note, that in Finland law states that pedestrians have to use pedestrian path if one is available[2]. On the other hand, if a road has access=no tag and you want to allow pedestrian routing via it then add foot=yes, foot=designated or foot=permissive tag for the road. If you want to allow bicycle routing via the access=no tagged road then add bicycle=yes, bicycle=designated or bicycle=permissive tag.

You can also use bicycle=use_sidepath to prevent routing for bicycles but in this case remember to tag the sidepath, so that routing for bicycles will work. In practice, this often means adding highway=cycleway tag to the sidepath together with foot=yes or foot=designated tag.

Furthermore, access=destination, access=customers, access=delivery, access=forestry and access=agricultural affect also pedestrian and bicycle routing via the tagged road or path, so if the access is restricted only, for example, to motor vehicles then use the motor_vehicle=* tag instead of the access=* tag for marking the restriction.

Though the Key:access page explains access:conditional=* tag, it is not currently used in OTP nor in Digitransit so, for example, time specific restrictions do not affect routing.

See also:

About areas without highway tag

Routing is done via areas that have the highway=* tag. For example, an area that has the amenity=parking but no highway=* tag is not taken into account in routing. However, one should usually add a way with highway=service together with service=parking_aisle tag inside the parking area and routing is done via this way.

Some examples

Various tasks

Bus stops

Adding a bus stop

Easy task

Not all bus stops have been added to the OpenStreetMap. You should add a node and public_transport=platform tag (highway=bus_stop also works) to it. It would be good to have an as accurate position as possible for the bus stop. Therefore you should either know the exact position or you could survey it by visiting the bus stop location. You should also add ref and name tags to it as described in the next task. In addition, you can add other tags such as shelter=*. The tag public_transport=stop_position is not currently used by Digitransit.

Adding ref and name

Easy task

There are bus stops that have been added to the OpenStreetMap but lack ref=* and name tags name=*, name:fi=* and name:sv=*. Adding the ref tag can improve accuracy of the bus stop location in Digitransit. You can find the correct ref and name tags from the actual physical bus stop, at least in Helsinki. In addition, you can find them from the Digitransit web map, at least in the HSL Reittiopas. Clicking the bus stop will show the information (though bus stop location can be inaccurate).

Note, that Digiroad data also contains bus stop ids for the whole of Finland and the Finnish transport agency has issued a permission to incorporate this CC-BY 4.0 licenced data into OpenStreetMap, so this data could also be used when providing bus stops with refs and names.

See also:

Creating and tagging elevators

Intermediate task

Elevators are used in routing when they are connected to the rest of the roads and paths and they are especially important to the people using wheelchairs and also people pushing prams use them a lot.

You should add node that is tagged with the highway=elevator and connect the node at the each level=* to the rest of the routing network. For example, this elevator at the Koivukylä railway station is connected in three levels. Please, notice that there is also the wheelchair=yes tag. Of course, more tags could be added if applicable.

See also:

Adding names for places

Intermediate task

Though OSM-road names ( highway=*) are not included in the place name search (you can think of it as address search), Digitransit uses data from the OSM-levels for the place name searches.

If a node, way, or area has one of the following tags then the value of the name=* and many of it's variations are included in the searches:

The name=* tag variations that are used together with the above tags are:

Also, if you add :en or :sv or some other language suffix to any of the above tags, that is also included in the searches, for example:

In addition, if you add addr:street=* and addr:housenumber=* tags for the node, way or area then the address is shown together with the name when searched. This is always useful but especially when there exists many places with the same name.

Please, note that currently tags from the relations data type are not included in the place name searches. Also, please note that even if a building has the addr:street=* and addr:housenumber=* tags a place node inside the building should also have those tags to be shown together with the place name when searched.

See also:

  • Geocoding Data on Digitransit.fi pages for more details on how the search works and what data sources are utilized in it

Editing railway platforms

Tagging the platforms

Advanced task

For example, the railway station at the Helsinki-Vantaa airport has two platforms, one for the I train and one for the P train (see the Reittiopas search results).

One possible solution, probably not a good one because it doesn't use the public_transport=stop_position and it differs from practice eg. in Germany, in this case would be to create a public_transport=stop_area_group relation that has two public_transport=stop_area relations and each of these two relations has the ref=* tag that has the "short id" of the stop as the value. For example, for the Helsinki-Vantaa airport case the ref values would be V0531 and V0536. As an example, see V0531 public_transport=stop_area relation.

In some cases many platforms can have the same short id. In these cases you could still add separate public_transport=stop_area relations and give the same ref value for them.

To add the number of the platform you could use the ref=* tag or maybe local_ref=* for the area object that has public_transport=platform tag. For the Helsinki-Vantaa airport railway station case the values are 1 and 2. See http://www.openstreetmap.org/way/461307443 as an example of the public_transport=platform area.

To see more information on the public_transport tagging and relations, please see:

Dividing single platform to multiple parts

Advanced task

The train stop location are currently taken from GTFS. Routing currently happens via railway platform area borders and not over the area unless the area is divided to multiple parts (or there is a highway tagged way going from the border of the area to some other border).

The above facts mean that routing can give unnecessary long routes going from a point on a side of the platform to end of the platform and to the point (near the train stop) on the other side of the platform. This issue can be solved by diving the platform to parts on the locations where a highway is connected to the platform.

For example, an Espoo railway station platform is divided to two parts (https://www.openstreetmap.org/way/479453500 and https://www.openstreetmap.org/way/34007202) on nodes https://www.openstreetmap.org/node/669330256 and https://www.openstreetmap.org/node/4725484001. Note that there is a way tagged highway=footway (https://www.openstreetmap.org/way/40168456) and two ways tagged highway=steps (https://www.openstreetmap.org/way/34007204 and https://www.openstreetmap.org/way/462035339) connected to the platform on this location. If the platform was not divided to two parts then the route from the footway to the south side of the platform would happen via the end of the platform.

Editing two platforms next to each other

Advanced task

Often there is a platform area between two railway tracks that is physically one platform but has two platform numbers or letters, one for each track. For example, at the Helsinki central railway station the platform 5 and platform 6 are physically same area.

Sometimes to make the two platforms separate, you can simply divide the existing area in the OSM from the middle to two areas. However, quite often the existing platform in OSM is not an area but a way or there is, for example, an elevator building or highway=steps leading to tunnel below platforms in the middle of the area. Also, in the latter case the area has often been defined as Relation:multipolygon where there are inner areas for example, for the highway=steps. In this case you cannot simply divide the multipolygon two two areas, one for each platform.

The process to create two separate platforms from an multipolygon in the JOSM editor that has the UtilsPlugin2 installed is as follows:

  1. Add a way through the middle of the outer area (long axis) from border to border
  2. Select the outer area and the nodes at the ends of the way you added
  3. Split the outer area (alt+X)
  4. Select the two new areas and the inner area of your preference
  5. Add nodes at the intersections (shift+I)
  6. Select one of the new areas and the nodes at the intersection
  7. Split the way (P), select the new way inside the inner area and delete it.
  8. Repeat the previous two steps with the other new area.
  9. Select the inner area and the nodes in the middle of it's border and split the way (P)
  10. Select one of the new ways that were created from the inner area
  11. Select the way of the old outer area on the same side as the selected way of the old inner area
  12. Combine the ways (C), in the conflict dialog keep all the tag values and the public_transport relation (if one exists)
  13. Repeat the three previous steps for the other side of the old inner and outer area
  14. If needed you can add an building that shares the nodes of the old inner area
  15. Repeat steps from 4 to 14 for the rest of the inner areas

Miscellaneous notes

  • As long as there is aconnection between, for example, two ways via a node then Key:layer and Key:level do not affect routing.
  • Currently only cycling routing utilizes weights in the OpenTripPlanner (routing in the Digitransit is based on the OTP).
  • If you would like to see the OTP route graph of the Helsinki area as a base layer in your OSM editor (iD, JOSM, ...) then you can add it as a TMS layer: tms[21]:http://api.digitransit.fi/routing/v1/routers/hsl/inspector/tile/traversal/{z}/{x}/{y}.png. Also the HSL background map is available as a TMS layer: tms[21]:http://api.digitransit.fi/map/v1/hsl-map/{z}/{x}/{y}.png

See also

Especially for beginners

All mappers

More experienced mappers


  1. Kiertoliittymä ja miten siinä ajetaan, Tiehallinto, http://alk.tiehallinto.fi/kiertol/kiertol.htm
  2. Tieliikennelaki, 3.4.1981/267, Finlex, Oikeusministeriö, ylläpito Edita Publishing Oy, http://www.finlex.fi/fi/laki/ajantasa/1981/19810267