Expand description
num_segments(&g) — total edge count.
Mirrors boost::geometry::num_segments from
boost/geometry/algorithms/num_segments.hpp.
| Kind | Segment count |
|---|---|
Point / MultiPoint | 0 |
Segment | 1 |
Box | 4 (an axis-aligned rectangle has four edges) |
Linestring with n points | n - 1 (0 if n < 2) |
Ring with n points | n - 1 if closed, n if open |
Polygon | Σ over exterior + interior rings |
MultiLinestring / MultiPolygon | sum over members |
Functions§
- num_
segments - Total number of segments (edges) in
g.