Skip to contents

Retrieve OpenStreetMap data for a given location

Usage

get_osmdata(name, key, value)

Arguments

name

A character string with the name of the place to retrieve the bounding box

key

A character string with the key to filter the data

value

A character string with the value to filter the data

Value

An sf object with the retrieved OpenStreetMap data for the given location

Examples

get_osmdata("Bucharest", "waterway", "river")
#> Object of class 'osmdata' with:
#>                  $bbox : 44.3342466,25.9666745,44.5413964,26.2255768
#>         $overpass_call : The call submitted to the overpass API
#>                  $meta : metadata including timestamp and version numbers
#>            $osm_points : 'sf' Simple Features Collection with 12518 points
#>             $osm_lines : 'sf' Simple Features Collection with 102 linestrings
#>          $osm_polygons : 'sf' Simple Features Collection with 0 polygons
#>        $osm_multilines : 'sf' Simple Features Collection with 4 multilinestrings
#>     $osm_multipolygons : NULL