Hi Stephan,

Stephan Menzel schreef op 3-1-2015 om 18:43:
May I humbly bump this...

I have a standanlone cpp file attached for your convenience but it's really just those lines...

Thank you for your consideration.

Stephan


On Tue, Dec 9, 2014 at 11:17 AM, Stephan Menzel <stephan.menzel@gmail.com> wrote:
Hello,

I am trying to port existing and working code from 1.54 to above and ever since 1.55 there's a compile error on both gcc and VC9 here:

typedef boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> Point;
typedef boost::geometry::model::box<Point>                                       BoundingBox;
typedef boost::geometry::model::segment<Point>                                   Segment;
typedef boost::geometry::model::linestring<Point>                                LineString;

// LineString raw is being filled
LineString ret;

    typedef boost::geometry::strategy::distance::projected_point<Point> PointSegmentDistanceStrategy;
    typedef boost::geometry::strategy::simplify::douglas_peucker<Point, PointSegmentDistanceStrategy> SimplificationStrategy;
    SimplificationStrategy strat;
    boost::geometry::simplify<LineString, double, SimplificationStrategy>(raw, ret, 20, strat);



Sorry for the late reaction.

I had to dig it up but projected_point<Point> is now not templated anymore with Point but with an optional calculation type. So saying the next is OK:

        typedef boost::geometry::strategy::distance::projected_point<> PointSegmentDistanceStrategy;
        typedef boost::geometry::strategy::simplify::douglas_peucker<Point, PointSegmentDistanceStrategy> SimplificationStrategy;
        SimplificationStrategy strat;

and then one of:
        boost::geometry::simplify<LineString, double, SimplificationStrategy>(raw, ret, 20, strat);
        boost::geometry::simplify(raw, ret, 20, strat);
        boost::geometry::simplify(raw, ret, 20);

(because you use the default simplify strategy, you don't have to mention it)

This change was already done in July 2013 (so indeed, as you mentioned, for 1.55) and alas it was mentioned in the release notes but as a TODO (to be documented) item. Sorry for the inconvience.

Regards, Barend