mn_roads: Roads, railways, airports and places from OpenStreetMap

View source: R/layers-osm.R

mn_roadsR Documentation

Roads, railways, airports and places from OpenStreetMap

Description

Transport and settlement layers from OpenStreetMap, prepared from the Humanitarian OpenStreetMap Team exports. Each layer is downloaded once (roads about 30 MB, the others smaller) and cached; see mn_download().

Usage

mn_roads(class = "main", within = NULL, crs = NULL)

mn_railways(stations = FALSE, within = NULL, crs = NULL)

mn_airports(within = NULL, crs = NULL)

mn_places(
  type = c("city", "town", "village"),
  within = NULL,
  lang = NULL,
  crs = NULL
)

Arguments

class

Road classes to keep: "main" (motorways to tertiary roads, the default), "minor" (residential, service and unclassified streets), "track", "path", or "all".

within

Keep only features inside these places (names or codes of any level with a boundary, such as "Ulaanbaatar" or "Khovd").

crs

Coordinate reference system of the result. NULL (default) keeps longitude/latitude (EPSG:4326). Use "albers", "lcc" or "utm" for a projection suited to Mongolia (see mn_crs()), or any value accepted by sf::st_crs().

stations

If TRUE, mn_railways() returns railway stations as points instead of the lines.

type

Place types for mn_places(): any of "city", "town", "village", "hamlet", "suburb" and "isolated_dwelling".

lang

Language of the name column: "en" (English, as in NSO tables), "mn" (Cyrillic) or "mns" (Latin with diacritics, MNS 5217). Defaults to getOption("mongolmaps.lang", "en").

Details

Use within to get a layer for one place: only the features in that place's bounding box are read from disk, then lines are cut at its border.

Value

An sf tibble with osm_id, name (in the chosen language, where OpenStreetMap has it), name_en, name_mn and layer-specific columns: highway, class and surface for roads; railway for railways; place and population for places.

Licence

OpenStreetMap data are available under the Open Database Licence (ODbL). Credit "(c) OpenStreetMap contributors" when you publish maps; mn_citation("osm_roads") gives the text.

See Also

Other thematic layers: mn_neighbours(), mn_protected_areas(), mn_settlements()

Examples


ub_roads <- mn_roads(class = c("main", "minor"), within = "Ulaanbaatar")
mn_railways()
mn_airports()
mn_places(within = "Khovd")


mongolmaps documentation built on Oct. 10, 2026, 5:08 p.m.