|
Geometry : |
Subject: Re: [geometry] Compile Error with douglas peucker
From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2015-01-03 13:42:28
Hello Barend,
thank you, that compiles. I can move to 1.57 now.
I can't believe though I had this verbose code in place when keeping all
default would have done the same job and avoid this error. Guess I just
didn't know.
Thanks for the clarification.
Cheers,
Stephan
On Sat, Jan 3, 2015 at 7:15 PM, Barend Gehrels <barend_at_[hidden]> wrote:
> 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_at_[hidden]>
> 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
>
>
>
> _______________________________________________
> Geometry mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/geometry
>
>
Geometry list run by mateusz at loskot.net