Combine all Shops results into single dataset. It merges Points, Polygons and Myltipolygons into a single dataset of Points using centroids of polygons when necessary.

osm.combineShops(inam)

Arguments

inam

a

Value

A nice

Author

Dimitris Kavroudakis dimitris123@gmail.com

Examples

library(goal)
sh = osm.getPOI(inPerioxi = "Mytilene Municipal Unit", inkey = "shop")
#> Issuing query to Overpass API ...
#> Announced endpoint: gall.openstreetmap.de/
#> Query complete!
#> converting OSM data to sf format
sh
#> Object of class 'osmdata' with:
#>                  $bbox : 39.0080581,26.4556309,39.1730365,26.6159708
#>         $overpass_call : The call submitted to the overpass API
#>                  $meta : metadata including timestamp and version numbers
#>            $osm_points : 'sf' Simple Features Collection with 1052 points
#>             $osm_lines : 'sf' Simple Features Collection with 2 linestrings
#>          $osm_polygons : 'sf' Simple Features Collection with 102 polygons
#>        $osm_multilines : NULL
#>     $osm_multipolygons : 'sf' Simple Features Collection with 1 multipolygons
shops = osm.combineShops(sh)
#> 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
shops
#> Simple feature collection with 1155 features and 4 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 26.4562 ymin: 39.03606 xmax: 26.61245 ymax: 39.1719
#> Geodetic CRS:  WGS 84
#> First 10 features:
#>              osm_id                  name          shop     geotype
#> 232597560 232597560            Κωτσόβολος   electronics frompolygon
#> 251867612 251867612                  Lidl   supermarket frompolygon
#> 251868137 251868137         Chinese Store       clothes frompolygon
#> 251991641 251991641       ΑΒ Βασιλόπουλος   supermarket frompolygon
#> 252369882 252369882             Μy Market   supermarket frompolygon
#> 255945997 255945997 Κοινωνικό παντοπωλείο   supermarket frompolygon
#> 256627981 256627981               Ανεμώνη confectionery frompolygon
#> 257685220 257685220               Φράγκος     furniture frompolygon
#> 258057913 258057913            Μολυβιάτης          toys frompolygon
#> 258057914 258057914            Μολυβιάτης          toys frompolygon
#>                            geometry
#> 232597560 POINT (26.55529 39.10176)
#> 251867612 POINT (26.54371 39.13064)
#> 251868137 POINT (26.54284 39.12877)
#> 251991641 POINT (26.54546 39.12553)
#> 252369882  POINT (26.55517 39.1003)
#> 255945997  POINT (26.55562 39.1069)
#> 256627981 POINT (26.45648 39.03617)
#> 257685220 POINT (26.46862 39.12083)
#> 258057913 POINT (26.55741 39.10794)
#> 258057914 POINT (26.55747 39.10811)