Skip to main content

Hi,

 

I want to simplify some line geometries which may be single or multi part IF their coordinate count is greater than a fixed value.

 

Is there a simple way that I can apply a generalisation based of max resultant coordinate count rather than a tolerance setting where the post generalisation coordinate count will not be know until until after the generalisation has been applied. In the latter situation if the count still exceeds my threshold the tolerance would have to be increased, and generalised once or multiple times?

 

I was interested to know if I could go straight to my max value rather than having to create a looped process?

 

I am using FME(R) 2022.2.3.0 (20230131 - Build 22789 - WIN64) 

 

Ultimately I want to create a WKT Geom encode which does not exceed a fixed string length. For this I know that each line should have no more than ~1250 vertices, so I want to simplify the line to this number if the coordinate count exceeds this.

 

Regards,

 

Rob

I do not know of a way to do this without looping. What we did to solve this was a combination of a reprojectors, a vertexcounter, a generalizer and a increasing tolerance parameter in a looping custom transformer. And it works like a charm.


Thanks @nielsgerrits​ . I had suspicion that I would have to create a loop to do this but wanted to check just in case. It would be good if you could specify Max Coord Count or Tolerance (as presently) within the Generaliser.


Reply