clear

# clear: clear geometries

typename Geometry
void void boost::geometry::clear (Geometry &geometry) clear Geometry & geometry

Clears a linestring, ring or polygon (exterior+interiors) or multi*.

Generic function to clear a geometry. All points will be removed from the collection or collections making up the geometry. In most cases this is equivalent to the .clear() method of a std::vector<...>. In the case of a polygon, this clear functionality is automatically called for the exterior ring, and for the interior ring collection. In the case of a point, boxes and segments, nothing will happen.

Geometry

Any type fulfilling a Geometry Concept

geometry

A model of the specified concept which will be cleared

points and boxes cannot be cleared, instead they can be set to zero by "assign_zero"

[include reference/algorithms/clear.qbk]