Skip to content

Instantly share code, notes, and snippets.

@cscheid
Forked from cpsievert/osm.R
Last active January 3, 2016 09:29
Show Gist options
  • Save cscheid/8443455 to your computer and use it in GitHub Desktop.
Save cscheid/8443455 to your computer and use it in GitHub Desktop.
setwd("~/Downloads")
obs <- XML2Obs("out.xml", url.map=TRUE)
unique(names(obs)) #you might want to re_name or add_key before collapsing
tmp = add_key(obs, parent="url1//osm//way", key.name="way_id")
tmp = add_key(tmp, parent="url1//osm//node", key.name="node_id")
tmp = add_key(tmp, parent="url1//osm//relation", key.name="relation_id")
tables <- collapse(obs) # holy crap this takes a long-ass time
head(tables[["osm//node//tag"]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment