osmar (version 1.1-7)

as_osmar: Convert OSM-XML to an osmar object

Description

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

Usage

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

Run this code
file <- system.file("extdata", "kaufstr.xml", package = "osmar")
  raw <- readLines(file)
  kaufstr <- as_osmar(xmlParse(raw))

Run the code above in your browser using DataLab