Examples for 'sf::st_zm'


Drop or add Z and/or M dimensions from feature geometries

Aliases: st_zm

Keywords:

### ** Examples

st_zm(st_linestring(matrix(1:32,8)))
LINESTRING (1 9, 2 10, 3 11, 4 12, 5 13, 6 14, 7 15, 8 16)
x = st_sfc(st_linestring(matrix(1:32,8)), st_linestring(matrix(1:8,2)))
st_zm(x)
Geometry set for 2 features 
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 1 ymin: 3 xmax: 8 ymax: 16
CRS:           NA
LINESTRING (1 9, 2 10, 3 11, 4 12, 5 13, 6 14, ...
LINESTRING (1 3, 2 4)
a = st_sf(a = 1:2, geom=x)
st_zm(a)
Simple feature collection with 2 features and 1 field
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 1 ymin: 3 xmax: 8 ymax: 16
CRS:           NA
  a                           geom
1 1 LINESTRING (1 9, 2 10, 3 11...
2 2          LINESTRING (1 3, 2 4)

[Package sf version 1.0-19 Index]