% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sf.R
\name{npts}
\alias{npts}
\title{count the number of points/vertices/nodes of sf objects}
\usage{
npts(x, by_feature = FALSE)
}
\arguments{
\item{x}{an sf/sfc object}

\item{by_feature}{count total number of vertices (FALSE) of for each feature (TRUE).}
}
\description{
count the number of points/vertices/nodes of sf objects
}
\note{
currently only works for *POINTS, *LINES and *POLYGONS (not GEOMETRYCOLLECTION).
}
\examples{
npts(franconia)
npts(franconia, by_feature = TRUE)
npts(sf::st_geometry(franconia[1, ])) # first polygon

npts(breweries) # is the same as
nrow(breweries)

}
