I am using the osmdata
package to bring the universities of Bogota, some of these are mapped as multipolygons
. However the plot comes out empty. Any idea how to fix it?
library(osmdata)
library(mapview)
query <- opq(bbox = "Bogota") %>% add_osm_feature(key = "amenity",value = "university") %>% osmdata_sf()
mapview(query$osm_multipolygons[,c("osm_id","name","amenity")], map.types = "OpenStreetMap")
#mapview(query$osm_polygons[,c("osm_id","name","amenity")], map.types = "OpenStreetMap")
Note: when plotting the points or polygons it works correctly.
The solution is to make a transformation to the object's coordinate system. As it's shown in the following:
For more information check the following link. Coordinate Systems in R