Using the same polygon the Generalizer (Douglas, tolerance=0) returns different results depending on the orientation of the polygon.
Any explanation?
Using the same polygon the Generalizer (Douglas, tolerance=0) returns different results depending on the orientation of the polygon.
Any explanation?
As the documentation says:
The Douglas-Peucker algorithm will remove vertices which cause a deviation of less than the Generalization Tolerance, but the location of remaining vertices are not altered. Thus, this algorithm is good at reducing the number of points in a line, it is not very good at preserving the shape or the spatial relationship of the line relative to other entities. When used on polygons, the start point is never removed.
(bold emphasis is mine).
Since the algorithm begins processing at the starting vertex, then the second vertex, and so forth, I’m not at all surprised that changing the order of the vertices gives a different result.
For only three vertices in a line yes, you’re right, but most polygons have far more vertices….
If you think something is off with the software, the best thing to do is probably submit a ticket at Safe Software.
https://support.safe.com/hc/en-us/p/support
I suspect the issue with the “Vertices order sensitive Generalizer” is related to how FME optimizes accuracy. At a very basic level, you can calculate the vertical distance of a point from a line using the attribute manager in FME. If you do this with your data without doing anything to improve the computational accuracy than you will get 4 verticies that are colinear regardless of direction.
If you then make a lazy attempt at improving the computational accuracy by subtracting the minimum x and y value from every coordinate than you will find that no points are colinear. Hence, you can speculate that FME could potentialy use a forward looking algorthim that considers the next so many values to improve computational accuracy and this could be in an interative or recursive approach and then you will get the observed directional dependence.
The attached FME workspace calculates the perpendicular distance of a point from a line for each of your verticies, and also shows the difference if you improve the computational accurace by subctracting the minimum x and y.