Get the bbox of a result, as an SF polygon.
osm.osmdata_result_2_bbox_pol(osmdata_result)
An osmdata
result.
An SF polygon which is the bbox of the osmdata
result.
Other osm:
osm.ClipSFnetwork_with_poly()
,
osm.CreateEmptyRaster()
,
osm.bb_2_pol()
,
osm.combineAmenities()
,
osm.combineShops()
,
osm.getFrequency()
,
osm.getLength_footway()
,
osm.getPOI_usingbb()
,
osm.getPOI()
,
osm.getRoads()
library(devtools)
#install_github("dimitrisk/goal")
library(goal)
library(sf)
library(stringr)
am = goal::osm.getPOI_usingbb( c(26.547303,39.101658,26.564641,39.113247), inkey ="amenity" )
#> Issuing query to Overpass API ...
#> Announced endpoint: gall.openstreetmap.de/
#> Query complete!
#> converting OSM data to sf format
amenities = goal::osm.combineAmenities(am)
#> Warning: st_centroid assumes attributes are constant over geometries
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
#> Warning: st_centroid assumes attributes are constant over geometries
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019
thepol = goal::osm.osmdata_result_2_bbox_pol(am)
#> Warning: GDAL Error 1: PROJ: proj_as_wkt: DatumEnsemble can only be exported to WKT2:2019