Get all POIs of a city. Providing the bounding box we get back an osmdata object of Spatial Feature ("sf") type.

osm.getPOI_usingbb(
  inbb = c(26.547303, 39.101658, 26.564641, 39.113247),
  inkey = "amenity"
)

Arguments

inbb

A vector of coordinates, representing the bounding box of the area.

inkey

The name of a key such as: amenities, shops, ...

Value

An osmdata object of Spatial Feature ("sf") type.

Author

Dimitris Kavroudakis dimitris123@gmail.com

Examples

library(goal)
myt = osm.getPOI_usingbb( c(26.547303,39.101658,26.564641,39.113247) )
#> Issuing query to Overpass API ...
#> Announced endpoint: gall.openstreetmap.de/
#> Query complete!
#> converting OSM data to sf format
myt
#> Object of class 'osmdata' with:
#>                  $bbox : 39.101658,26.547303,39.113247,26.564641
#>         $overpass_call : The call submitted to the overpass API
#>                  $meta : metadata including timestamp and version numbers
#>            $osm_points : 'sf' Simple Features Collection with 1714 points
#>             $osm_lines : 'sf' Simple Features Collection with 11 linestrings
#>          $osm_polygons : 'sf' Simple Features Collection with 196 polygons
#>        $osm_multilines : NULL
#>     $osm_multipolygons : 'sf' Simple Features Collection with 3 multipolygons