ropensci / osmextract

Download and import OpenStreetMap data from Geofabrik and other providers
https://docs.ropensci.org/osmextract
GNU General Public License v3.0
170 stars 12 forks source link

Bug in oe_get_keys #201

Closed agila5 closed 3 years ago

agila5 commented 3 years ago

Reprex:

# packages
library(osmextract)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright.
#> Check the package website, https://docs.ropensci.org/osmextract/, for more details.

# read in test data
iow <- oe_get("Isle of Wight", quiet = TRUE, query = "SELECT * FROM lines WHERE osm_id == 594620")

# Print the other_tags column
iow$other_tags
#> [1] "\"comment\"=>\"Removed junction=roundabout as some entrances have right of way. See http://wiki.openstreetmap.org/wiki/Tag:junction%3Droundabout\",\"lit\"=>\"yes\",\"maxspeed\"=>\"30 mph\",\"oneway\"=>\"yes\",\"surface\"=>\"asphalt\""

The keys should be “comment”, “lit”, “maxspeed”, “oneway” and “surface”, while

oe_get_keys(iow)
#> [1] "comment"                                                                                                         
#> [2] "roundabout as some entrances have right of way. See http://wiki.openstreetmap.org/wiki/Tag:junction%3Droundabout"
#> [3] "yes"                                                                                                             
#> [4] "30 mph"                                                                                                          
#> [5] "asphalt"

Created on 2021-05-10 by the reprex package (v2.0.0)