Boost logo

Geometry :

Subject: Re: [geometry] breaking change on transform strategies
From: Bernhard (Bernhard.Schmitz_at_[hidden])
Date: 2013-11-21 06:18:46


I just updated to boost 1.55 and ran into the propblem of breaking changes
on transform strategies.
Reading the announcement, I was wondering if I am doing something wrong.

Barend wrote
> Hi,
> As a follow-up of the new approach on strategies, started by Bruno (see
> earlier mail about distance strategies), the transform strategies are
> now also updated. This means the point-type are not template-parameter
> of the strategy anymore, but of the member-method apply.
> In most use-cases, as a library user, you have to do nothing. So
> probably everything will compile. Also if you are using the transform
> algorithm, it will work. Also if you are using svg_mapper (using
> underlying transformations), it will work.

The reason I ask is that it sounds as if the transformations can somehow be
done without the strategies.
Right now I rotate and translate geometries in templated functions, let's
template<typename tSegment, typename tPoint>
tPoint doFancyStuff(const tSegment segment)

In the function's body I currently do things like
trans::translate_transformer<tPoint, tPoint> translate(...);
trans::rotate_transformer<tPoint, tPoint, boost::geometry::degree>
and then
bg::transform(..., translate);

With the change, as I see it, I now have to declare the strategies as
bg::dimension<BGCartesianPoint>::value> rotate(...);
bg::dimension<BGCartesianPoint>::value> translate(...);

Am I missing something? Could this be done easier? Or if not, (out of
curiosity) what is the benefit of the new way of doing it? I have to write
much more now.

Additionally, it might be a good idea, to announce these changes as breaking
in the release notes. I read those and thought: Well no breaking changes, so
I can update with no problems. ;-)

Kind regards,

View this message in context:
Sent from the Boost Geometry mailing list archive at

Geometry list run by mateusz at