osh_filter: Apply filters to an 'oshex-class'

Description Usage Arguments Methods (by class) Details Examples

Description

Filter an oshex-class based on temporal, tags and attributes expression Lists.

Usage

 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
29
30
31
32
33
34
35
36
37
osh_filter(object, conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'oshex,listORmissing,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'oshElement,oshExListTag,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'oshElement,oshExListAttrs,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'oshElement,oshExListTemp,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'nodeList,oshExListGeo,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)


  ## S4 method for signature 
## 'oshElement,oshExListGeo,logicalORmissing,logicalORmissing'
osh_filter(object,
  conditions = NULL, union = FALSE, full.parse = TRUE)

Arguments

object

An oshex object as given by as_oshex.

conditions

One condition given as an oshExList-class object, or a list with several conditions.

union

A logical to determine if the result is a union of all conditions (if TRUE) or their intersection (if FALSE). Defaults to FALSE.

full.parse

A logical to determine if filter should keep interrelated objects (See 'Details' below). Defaults to TRUE.

Methods (by class)

Details

Information in an oshex object is split by type between nodes, ways, and relations. Nodes function both as independent objects (e.g. bus-stops) or as building blocks of a way (line or polygons). In addition, individual objects play a role as members of a relation object. For example, bus-stops (nodes), and bus-routes (ways) form together a public transport relation. osh_filter can account for these interrelated objects by setting full.parse = TRUE.

Examples

1
2
3
4
## Not run: 
highway <- osh_filter(object = osh, conditions = tag(c(k %eq% highway, v %eq% primary), union = FALSE)

## End(Not run)

dof1985/OSHEX documentation built on May 28, 2019, 3:36 p.m.