Subject: [ggl] Proposal for Delauney triangulation algorithm
From: Barend Gehrels (barend)
Date: 2011-10-23 05:32:44
On 23-10-2011 2:01, John Swensen wrote:
> I don't quite understand the "concept" concept. I looked through the sources and looked at the boost documentation on concepts and have a rough idea. Should I create a new "concept" called the divide_simplify_concept.hpp in boost/geometry/strategies/concepts? Then the implementation of this will do different things for different models (e.g. Bezier curves for linestrings, triangles, for polygons, etc)?
> I guess my questions is what is the appropriate concept for simplifying a geometry by breaking it up in simpler pieces (of the same or different geometry)?
Good question. There are different kind of concepts:
1) concepts for geometries (followed and used by all geometries in the
2) concepts for strategies (followed by some)
We're now talking about the first, the concepts for geometries. That
means that, e.g., you should not use point.x() but
geometry::get<0>(point) instead. This makes sure that any point type
(provided it fulfils the concepts) can be used. The same for linestrings
but that is as a range, so it is just using the boost::range algorithms.
And for polygons, and that uses geometry::exterior_ring() and
geometry::interior_rings() and further ranges as well. For
multi-geometries it is also all ranges.
So it is not really difficult. It is somewhere in that paper we wrote
(available on <http://trac.osgeo.org/ggl/wiki/BoostCon>, the 2010 one) ,
but there it is more worked out from design perspective and not from
user perspective. Maybe a good idea once.
Geometry list run by mateusz at loskot.net