
I've been looking at the proposed boost geometry library at: http://geometrylibrary.geodan.nl/geometry.html Two issues so far: 1) geometry::linestring seems unecessary, it just wraps vector, deque, list. Why? If every library wrapped the standard containers in this way, we'd have an explosion of these wrappers. The library should just use vector, deque, etc. directly. 2) The library should support std::back_inserter. Functions, such as geometry::simplify should work like this: std::vector<geometry::point_xy<int> > points; boost::geometry::simplify(oldpoints, std::back_inserter(points));

Hi Tom, Thanks for your interest, sorry for my late reply. Tom Brinkman wrote:
I've been looking at the proposed boost geometry library at: http://geometrylibrary.geodan.nl/geometry.html
Two issues so far:
1) geometry::linestring seems unecessary, it just wraps vector, deque, list. Why? If every library wrapped the standard containers in this way, we'd have an explosion of these wrappers. The library should just use vector, deque, etc. directly.
You are right. The first preview of the library used the linestring (and the linear_ring, which is similar) directly. Based on comments on the list on this, many of these occurances were replaced by iterator pairs. So now the linestring probably might go completely. Until now I didn't do this, the library is built following the conventions of the OGC (open geospatial consortium). Basic OGC geometries are point, linestring, polygon and multi_point, multi_linestring and multi_polygon, where a polygon consists of linear_ring's. If we omit one or many of those geometries, it would be less clear in that perspective. It is actually more a typedef then a wrapper, it could be a future template typedef.
2) The library should support std::back_inserter. Functions, such as geometry::simplify should work like this:
std::vector<geometry::point_xy<int> > points; boost::geometry::simplify(oldpoints, std::back_inserter(points));
I agree, I was not aware that this one indeed doesn't accept a back_inserter. Other functions such as from_wkt support back_inserter and the intention is that this is possible at all places, we will work on this for the next version. Regards, Barend
participants (2)
-
Barend Gehrels
-
Tom Brinkman