Simple features

In simple features, we can put more information on the coordinates in the form of either ‘Z’ or ‘M’, or both.

Maunga Whau traversal

This epic journey takes us to the top of a volcano.

library(raster)
## Loading required package: sp
## Registered S3 methods overwritten by 'ggplot2':
##   method         from 
##   [.quosures     rlang
##   c.quosures     rlang
##   print.quosures rlang
lines(xy_traverse[, 1:2])

plot(zz, type = "l")

Having done all of this work, we write a nice compact report.

## Linking to GEOS 3.5.0, GDAL 2.2.2, PROJ 4.8.0
report <- st_sf(name = "epic traverse", st_sfc(st_linestring(cbind(xy_traverse, zz))))

plot(report)

print(report)
## Simple feature collection with 1 feature and 1 field
## geometry type:  LINESTRING
## dimension:      XYZ
## bbox:           xmin: 0.161 ymin: 0 xmax: 0.614 ymax: 0.698
## epsg (SRID):    NA
## proj4string:    NA
##            name st_sfc.st_linestring.cbind.xy_traverse..zz...
## 1 epic traverse                LINESTRING Z (0.161 0 114, ...

What is the relational structure of this object?

TBD

library(spbabel)
map_table(report, v_atts = c("x_", "y_", "z_"))
## $o
## # A tibble: 1 x 3
##   name               st_sfc.st_linestring.cbind.xy_traverse..zz... object_ 
##   <fct>                                               <LINESTRING> <chr>   
## 1 epic trav… Z (0.161 0 114, 0.186 0.029 120, 0.202 0.037 122, 0.… axtptH3…
## 
## $b
## # A tibble: 1 x 1
##   object_   
##   <chr>     
## 1 axtptH3yMM
## 
## $bXv
## # A tibble: 35 x 2
##    order_ vertex_   
##     <int> <chr>     
##  1      1 gSjD8EuXdu
##  2      2 RNtygcBgb3
##  3      3 8KyA2eSakm
##  4      4 DcqIrcDLLu
##  5      5 5liriKQmls
##  6      6 l15xhvyxWm
##  7      7 0Lo1GsXbXo
##  8      8 Z6mUGaPZ1g
##  9      9 sDRHumqMOC
## 10     10 405IU2YIip
## # … with 25 more rows
## 
## $v
## # A tibble: 35 x 4
##       x_    y_    z_ vertex_   
##    <dbl> <dbl> <dbl> <chr>     
##  1 0.161 0       114 gSjD8EuXdu
##  2 0.186 0.029   120 RNtygcBgb3
##  3 0.202 0.037   122 8KyA2eSakm
##  4 0.228 0.053   128 DcqIrcDLLu
##  5 0.252 0.053   130 5liriKQmls
##  6 0.27  0.06    132 l15xhvyxWm
##  7 0.285 0.094   138 0Lo1GsXbXo
##  8 0.292 0.121   142 Z6mUGaPZ1g
##  9 0.309 0.155   146 sDRHumqMOC
## 10 0.349 0.2     146 405IU2YIip
## # … with 25 more rows
## 
## attr(,"class")
## [1] "map_table" "list"