I am using it as

boost::geometry::simplify(orgLineString,simplifiedLineString,maxMoveDistance);

I am assuming that the above code does 2D douglas-Peucker, is it correct?

Thanks,

Suresh

_______________________________

Suresh Jakka

GeoCue Corporation

(256) 461-8289 Telephone

(256) 461-8249 Fax

Integrating the Geospatial Workplace...

From: Adam Wulkiewicz [via Boost Geometry] [mailto:ml-node+[hidden email]]
Sent: Tuesday, April 12, 2016 1:24 PM
To: Suresh Jakka <[hidden email]>
Subject: Re: Is simplify algorithm 3D aware

Hi,

Jakka30 wrote:

What we noticed is that, if a point exceeds the max_distance in Z direction, but within the max_distance in x and y, it is still removing that point.

By default simplify() use:
- the default simplify strategy, bg::strategy::simplify::douglas_peucker,
- the default point-segment strategy, in cartesian bg::strategy::distance::projected_point,
- the default point-point strategy, in cartesian bg::strategy::distance::pythagoras,

The first strategy is CS-agnostic and the two other strategies are N-dimensional. The projected_point strategy first calculates the coordinates of a point projected into a segment and then calculates the distance between this point and the original point using pythagoras strategy. So a point is removed when a distance between this point and a segment created between currently analysed endpoints in douglas_peucker strategy is lesser than max_distance.

Do you have a example where it works in the z direction too?

It calls simplify() with the default strategies: https://github.com/boostorg/geometry/blob/develop/test/algorithms/test_simplify.hpp#L87

Could you share a test case when the behavior is not correct?

Regards,

_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry