Revisions
-
cscheid revised this gist
Jan 15, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,4 +5,7 @@ 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 write.table(tables$`url1//osm//way//nd`, "ways.csv", sep=",") write.table(tables$`url1//osm//way//tag`, "way_tags.csv", sep=",") write.table(tables$`url1//osm//node`, "nodes.csv", sep=",") # ... -
cscheid revised this gist
Jan 15, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ 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"]]) -
cpsievert created this gist
Jan 15, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ setwd("~/Downloads") obs <- XML2Obs("out.xml", url.map=TRUE) unique(names(obs)) #you might want to re_name or add_key before collapsing tables <- collapse(obs) head(tables[["osm//node//tag"]])