Skip to main content

Module num_segments

Module num_segments 

Source
Expand description

num_segments(&g) — total edge count.

Mirrors boost::geometry::num_segments from boost/geometry/algorithms/num_segments.hpp.

KindSegment count
Point / MultiPoint0
Segment1
Box4 (an axis-aligned rectangle has four edges)
Linestring with n pointsn - 1 (0 if n < 2)
Ring with n pointsn - 1 if closed, n if open
PolygonΣ over exterior + interior rings
MultiLinestring / MultiPolygonsum over members

Functions§

num_segments
Total number of segments (edges) in g.