Skip to main content

Hi

I've set up a Workspace that does the following;

 

Dissolves a MapInfo Polygon layer, adds a Counter and Attribute Creator then produces a 2d Oriented Bounding Box (and saves a MapInfo table)

 

Chops the Bounding Box including the Longest and Shortest values (and saves a MapInfo table as well), adds aother Counter then a Sorter & Sampler and then saves the result as a MapInfo table with the longest line from the Chopped table

 

In total there are 197 polygons in the source table which becomes 13 Groups when dissolved.

 

However, the final Table containing the Longest line for each Group is incorrect as some of the lines are the shortest ones. There are the correct number of lines though (13).

 

I've attached the FME workspace and a zip file with the source MapInfo table. If anyone would be interested to run the Workspace and see where i've gone wrong. I've tried using other columns within the Sorter and Sampler transformers but still get the same result.

 

It may be the Sorter and Sampler aren't the correct Transformers for this; if so, is there another transformer i can use?

 

Thanks in advance

Simon

If i've understood correctly, you need to calculate the length of the lines after chopping and then sort by this. Each chopped line from a single polygon will have identical shortest and longest attributes from the bounding box replacer so these cannot be used to sort.


@ebygomm​ 

 

Thanks for your promt answer

 

I did wonder whether that was the reason, but sometimes there's someone on this Forum who can suggest an alternative

I'll use FME to process the polygon using the Chopper then use MapInfo to select the record i want to use

 


@ebygomm​ 

 

Thanks for your promt answer

 

I did wonder whether that was the reason, but sometimes there's someone on this Forum who can suggest an alternative

I'll use FME to process the polygon using the Chopper then use MapInfo to select the record i want to use

 

Why can't you just use a lengthcalculator after the chopper and then sort by length followed by a sampler?


Reply