osmosisR: osmosisR

Description Usage Arguments Value Author(s) Examples

View source: R/getOSM.R

Description

Basic Interface to osmosis.

Usage

1
2
3
4
5
6
osmosisR(input, savename = "output.osm", idtracker = FALSE,
  usednode = FALSE, usedway = FALSE, extract_nodes = NULL,
  extract_ways = NULL, bbox = NULL, poly = NULL,
  filter_nodes = NULL, nodes_accept = TRUE, filter_ways = NULL,
  ways_accept = TRUE, filter_relations = NULL,
  relation_accept = TRUE)

Arguments

input

The input file path

savename

Output name

idtracker

If TRUE, sets idTrackerType=BitSet

usednode

If TRUE, sets –used-node

usedway

If TRUE, sets –used-way

extract_nodes

Must be given as key-value pair, like 'natural.tree'

extract_ways

Must be given as key-value pair.

bbox

Extract data with bounding box coordinates in lat/lon

poly

Extract data with .POLY files

filter_nodes

Use –tag-filter with nodes

nodes_accept

logical, if nodes should be accepted or rejected. Default is TRUE

filter_ways

Use –tag-filter with ways

ways_accept

logical, if ways should be accepted or rejected. Default is TRUE

filter_relations

Use –tag-filter with relations

relation_accept

logical, if relations should be accepted or rejected. Default is TRUE

Value

The osmosis call.

Author(s)

Sebastian Gatscha

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dest <- getOSM(filterby="osm", exclude = "md5", r1 = 2, r2 =13, dest="")
osmosisR(dest, savename = "highway_capeverde.osm",
         filter_ways = "highway=*")

osmosisR(dest,
         savename = "motorways_dest.osm",
         usednode = T, usedway = T,
         ways_accept = F,filter_ways = "",
         filter_nodes = "natural=tree")

## Get only tags with 'building=yes' and reject ways and relations.
osmosisR(dest,
         savename = "buildings_dest.osm",
         filter_relations = T,filter_ways = "",
         filter_nodes = "building=yes",
         relation_accept = F, nodes_accept =  T,
         ways_accept = F)

## Filter for multiple tag values (beach, tree)
osmosisR(dest,
        savename = "buildings_dest.osm",
        filter_nodes = "natural=beach,tree")

## Extract data based on node key-values
osmosisR(dest,
         savename = "tree_beach_dest.osm",
         usednode=F, usedway = T,
         extract_nodes = "natural.tree,natural.beach")

YsoSirius/getOSM documentation built on May 28, 2019, 8:59 p.m.