Hi John,

On 25-2-2013 20:38, John Lilley wrote:

(sorry another post; someone told me to put [library name] in [] in subject… learning something new every day J

 

Something of a repost, but I’ve learned a bit more on the path to being truly confused.  It appears that boost\geometry\extensions\algorithms\buffer\buffer_inserter.hpp contains some specializations for buffering other shape types?  But I’m out of my depth here… is there an example? 


Not in the examples folder or the docs, but the test contains lots of examples. Well, they all do the same thing, so what is done is this:

    join_miter
        <
            point_type,
            typename bg::point_type<GeometryOut>::type
        > join_strategy;

    typedef bg::strategy::buffer::distance_assymetric<double> distance_strategy_type;
    distance_strategy_type distance_strategy(distance_left, distance_right);
    std::vector<GeometryOut> buffered;
    bg::buffer_inserter<GeometryOut>(geometry, std::back_inserter(buffered),
                        distance_strategy,
                        join_strategy);


 


What do I need to do in order to buffer:

a point? 


Not possible yet.

A linestring? 


See above.

A vector of polygons? 


If you mean a multipolygon: see above.


A heterogeneous collections of shapes?


Not possible yet.


 

Is this generalization of buffer also going to work as a “deflate” for polygons?


Yes, the distance may be positive and negative. A negative distance will result in a deflate.

 

If someone can tell me “include these headers, use these algorithms”, it will help a lot!



I'll try to come with a more up to date example, now that the buffer is a hot topic again.

Regards, Barend