Osmosis OSM data source
Planet dumps as OSM data source through the osmosis command line Java application.
The file name (and path) of the planet dump
The path to the osmosis application
Osmosis is a command line Java application for processing OSM data. It allows, among other things, to extract data inside a bounding box or polygon from so called planet dumps. The usage of this source requires an installed osmosis; see http://wiki.openstreetmap.org/wiki/Osmosis.
Supported request elements
- Bounding box:
all nodes that are inside a given bounding box and any relations that reference them;
all ways that reference at least one node that is inside a given bounding box, any relations that reference them [the ways], and any nodes outside the bounding box that the ways may reference;
all relations that reference one of the nodes or ways included due to the above rules (does not apply recursively);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
## Not run: ## Download and extract a planet file: download.file("http://osmar.r-forge.r-project.org/", "muenchen.osm.gz") system("gzip -d muenchen.osm.gz") ## Define osmosis source; note that we assume that ## osmosis is in our path environment variable (if ## not, set osmosis argument to the executable): src <- osmsource_osmosis(file = "muenchen.osm") ## Get the center of Munich: muc_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000) muc <- get_osm(muc_bbox, src) muc ## End(Not run)