gibble: Path-based geometry decomposition

Description Usage Arguments Details Value Examples

View source: R/gibble.R

Description

A gibble is a geometry map, a summary of the structure of each path within a simple planar shape. The generic function gibble() will summarize all paths within a complex type with a data frame row for each. Each row of the gibble summary represents a component element of the object's geometry and records the number of rows (i.e. how many coordinates) and the number of columns (i.e. the number of axes in the geometric space). Another column type records the class of the object, and object records an identifier for the entire object. A special case column subobject identifies the component POLYGON part within a MULTIPOLYGON. I.e. subobject is 1 unless that part is a hole. All identifiers are sequential within the higher level groupings.

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## S3 method for class 'POINT'
gibble(x, ...)

## S3 method for class 'MULTIPOINT'
gibble(x, ...)

## S3 method for class 'LINESTRING'
gibble(x, ...)

## S3 method for class 'MULTILINESTRING'
gibble(x, ...)

## S3 method for class 'POLYGON'
gibble(x, ...)

## S3 method for class 'MULTIPOLYGON'
gibble(x, ...)

## S3 method for class 'list'
gibble(x, ...)

## S3 method for class 'sfc'
gibble(x, ...)

## S3 method for class 'sf'
gibble(x, ...)

## S3 method for class 'PATH0'
gibble(x, ...)

## S3 method for class 'PATH'
gibble(x, ...)

## S3 method for class 'trip'
gibble(x, ...)

## S3 method for class 'Polygon'
gibble(x, ...)

## S3 method for class 'Polygons'
gibble(x, ...)

## S3 method for class 'SpatialPolygons'
gibble(x, ...)

## S3 method for class 'Line'
gibble(x, ...)

## S3 method for class 'Lines'
gibble(x, ...)

## S3 method for class 'SpatialLines'
gibble(x, ...)

## S3 method for class 'SpatialMultiPoints'
gibble(x, ...)

## S3 method for class 'SpatialPoints'
gibble(x, ...)

## S3 method for class 'Spatial'
gibble(x, ...)

gibble(x, ...)

## Default S3 method:
gibble(x, ...)

Arguments

x

geometry model

...

arguments reserved for methods, none currently

Details

Methods are provided for the sf classes. There is an internal version that is designed to work fast on sets of structures, by delaying conversion to list or data frame for as late as possible.

A geometry map is not so helpful on its own, and so does not have a formal class. It is designed for use within other workflows such as updating the coordinates of model object or translating between superficially different formats.

Gibble is a distillation of the sc_path encoding of package silicate, which came from the map_table decompositions of spbabel, as an improvement on the single-table fortify model used in ggplot2.

Value

data frame summarizing the geometry map, see Details

Examples

1

gibble documentation built on July 1, 2020, 5:59 p.m.