Import streets from an OpenStreetMap extract

import_streetnet(
  path,
  extent = NULL,
  clip = FALSE,
  highway_types = DEFAULT_HIGHWAY_TYPES,
  tags = DEFAULT_TAGS,
  quiet = FALSE
)

Arguments

path

Path to a .osm.pbf file containing the extracted OpenStreetMap data for at least the extent of the area of interest.

extent

The area of interest as object of class sf or sfc. Only streets that intersect this area will be imported. If NULL, streets are imported for the complete OpenStreetMap extract.

clip

Boolean. If TRUE, linestrings will be clipped by the given extent. If FALSE, linestrings that intersect the given extent will be imported as a whole. Defaults to FALSE. Ignored when extent = NULL.

highway_types

A vector of possible values for OpenStreetMaps highway tag. Only streets that have one of these values for the highway tag will be imported. Defaults to DEFAULT_HIGHWAY_TYPES.

tags

A vector of OpenStreetMap tags that should be included as attribute columns in the imported data. Defaults to DEFAULT_TAGS.

quiet

Boolean. If FALSE, display progress information on screen. Defaults to FALSE.

Value

An object of class sf with LINESTRING or MULTILINESTRING geometries.