Subject: [ggl] what is an algorithm
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-04-25 14:13:34
Now we've update the structure, I was thinking about the algorithm
folder. To crowded or fine? It is sometimes hard to decide what is what.
Is "loop" an algorithm? Now in util.
OGC distinguishes algorithms:
- "query" contains within, touches, overlaps, disjoint, etc. This makes
sense to me
- "analysis" contains distance, buffer, ConvexHull, intersection, union.
This is also useful, there are two kinds:
- pointset spatial relationships (and, or, xor, not -->
intersection, union, sym_difference)
- other things as distance and buffer
- other, uncategorized such as envelope, dimension
I've put some in core (e.g. topological_dimension, because it is
completely compiletime), some in util (loop) and most in algorithms.
Besides OGC algorithms we have and get more:
- diameter (defined by the most furthest point-pair of a polygon,
- closest_pair (idem but most closest point-pair)
- combine a bounding box growing if points are added)
The easiest is to have them all in one folder algorithms, users then
don't have to think about what kind it is. Do you agree with that? The
folder will have dozens of files, but that is how it is, the boost/mpl
folder contains 182 files.
I'm using the GGL more and more in projects and have several pieces in
different states which will go there, coming time. As mentioned earlier:
touches, relate, disjoint, buffer, union but also diameter (see above),
remove_indentations, remove_small_holes (this last one should be
templatized by a selection struct), ...
Geometry list run by mateusz at loskot.net