boostorg/geometry — pull request #141 by mkaravel (2014-09-24 13:46:00+00:00)
Title: Feature/segment iterator

This PR proposes a const iterator for iterating over the segments of a geometry.
The supported geometries are: linestring, ring, polygon, multi-linestring and multi-polygon

Design-wise, the segment iterator keeps track of a point iterator for the supported geometry.
Once `operator*` is called on the segment iterator, then a segment object is created on the fly and returned to the user (using the current point iterator and its successor). To be precise the segment returned is a `boost::geometry::referring_segment` defined over a const point type (the point type of the geometry).

The proposed segment iterator is currently bidirectional.

**Motivation:** in the distance algorithm code, I need to create an R-tree based on the segments of a geometry. To do this I need access to the segments of a geometry, but without creating/copying the points.