Learn R Programming

stplanr (version 0.9.0)

n_vertices: Retrieve the number of vertices from a SpatialLines or SpatialPolygons object

Description

Returns a vector of the same length as the number of lines, with the number of vertices per line or polygon.

Usage

n_vertices(l)

Arguments

l

A SpatialLines or SpatalPolygons object

Details

See https://gis.stackexchange.com/questions/58147/ for more information.

See Also

Other lines: angle_diff(), geo_toptail(), is_linepoint(), line2df(), line2points(), line_bearing(), line_breakup(), line_midpoint(), line_sample(), line_segment_sf(), line_segment(), line_via(), mats2line(), n_sample_length(), onewaygeo(), points2line(), toptail_buff(), toptailgs(), update_line_geometry()

Examples

Run this code
# NOT RUN {
n_vertices(routes_fast)
n_vertices(routes_fast_sf)
# }

Run the code above in your browser using DataLab