```sh
devtools::install_github("YsoSirius/getOSM")
## Description
The package offers an interactive interface to
the download service of Geofabrik GmbH. If osmconvert is
set as system variable, the function ```convertOSM``` can also be
used. The same goes for osmosis, which enables the function
```osmosisR```.
Some basic information about the data size per country
and continent can be plotted as treemap with ```treemapOSM``` or
as mapview plot with ```mapviewOSM```
## Usage
### Download OSM Data
```sh
dest <- getOSM()
dest <- getOSM(exclude = "md5", r1 = 2, r2=13)
dest <- getOSM(filterby="shp", r1 = 2, r2=13)
dest <- getOSM(filterby="osm", exclude = "md5", r1 = 2, r2 =13, dest="")
```sh dest <- getOSM(filterby="osm", exclude = "md5", r1 = 2, r2 =13, dest="") convertOSM(dest, cm=T, cb = F, cw = F, fname = "capverde4", ext = "pbf")
### Get a summary of the OSM - Data size
```sh
sumry <- summaryOSM()
```sh treemapOSM(sumry)
### Plot the summary with mapviewOSM
```sh
mapviewOSM(sumry, mergeby = "country", unit = "gb")
The functions graphcycleOSM
and graphcarOSM
are used for bicycle and car routing.
```sh
dest <- getOSM(filterby="osm", exclude = "md5", r1 = 2, r2 =13)
graphpedesOSM(dest)
### Import to DB with osmosis
```sh
## The Database must already exist beforahand.
dblist <- list(dbname="test", dbuser="postgres", dbhost="localhost",
dbport="5432", dbpwd="postgres")
cmd <- postgresOSM(dest, dblist)
sh
ways <- sfOSM(dblist)
r <- filterSF(ways, tf=c("footway", "path"), plot=T);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.