ropenstreetmaposmar

Use osmar to load all data from an OSM file


The standard workflow for osmar is:

src <- osmsource_osmosis(file = "my_place.osm")
muc_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000)
muc <- get_osm(muc_bbox, src)

But what if I want to load all of the data from myplace.osm and don't know a priori the bounding box?

There doesn't seem to be an obvious way of getting the bounding box which contains all the data, or of telling get_osm to load everything.


Solution

  • I used default box corner arguments for osmosis:

    muc_bbox <- corner_bbox(left = -180, right = 180, top = 90, bottom = -90)