Tom Brinkman | 10 May 20:14

Proposed Geometry Library

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));
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Barend Gehrels | 20 May 16:45
Favicon

Re: Proposed Geometry Library

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.
(Continue reading)


Gmane