as_osmar: Convert OSM-XML to an osmar object

Description Usage Arguments Value Examples

Description

Convert a given OSM-XML object (as parsed by xmlParse) to an osmar object.

Usage

1
as_osmar(xml)

Arguments

xml

An OSM-XML object

Value

A list (with class attribute osmar) with three elements:

nodes

A list with two data frames containing the attributes and tags of the nodes.

ways

A list with three data frames containing the attributes, tags, and references of the ways.

relations

A list with three data frames containing the attributes, tags, and references of the relations.

Examples

1
2
3
  file <- system.file("extdata", "kaufstr.xml", package = "osmar2")
  raw <- readr::read_file(file)
  kaufstr <- as_osmar(read_xml(raw))

gergness/osmar2 documentation built on May 17, 2019, 2:10 a.m.