st_numpoints: Count the number of points in a geometry

Description Usage Arguments See Also Examples

View source: R/st_numpoints.R

Description

Count the number of points in a geometry

Usage

1
2
3
st_numpoints(.geom)

st_npoints(.geom)

Arguments

.geom

A geometry object.

See Also

Other make: st_makeline, st_makepoint, st_multi

Examples

1
2
3
4
5
6
library(tibble)
library(dplyr)

tibble(x = 1:2, y = 3:4) %>%
  mutate(geom = st_makepoint(x, y), n = st_npoints(geom)) %>%
  summarise(line = st_makeline(geom), n = st_numpoints(line))

etiennebr/geotidy documentation built on Feb. 28, 2020, 4:45 a.m.