Skip to main content

Hi,

 

I have a workbench where i need to fanout the output (GML writer) based on a chopper set to maximum of 1000 vertices. I guess I should be able to use the fanout option, setting it to the input-chopper but can´t seem to figure out exactlyhow to do it. Can someone point me in the right direction?

Christian

Not sre what you want to fan it out on, but do you mean fanning out on the "_chopped" attribute. (a chopper parameter created by the Chopper.)

 

This attribute indicates wich objects are chopped.

 

Remnants are...the remnants of the copped ones.
Hi,

 

what I basically would like is that FME could write a new GML file for every 1000 vertices or so. I thought that it would be possible combining the chopper with the fanout option in the writer?
Hello,

 

 

You will need to create a unique attribute value for each group of vertices that the fanout can be based on.

 

 

You can use a Counter after the Chopper, and then use the Count attribute as your fanout attribute.

 

 

Does that answer your question?

 

 

Cheers,

 

Allison

 

 

 
Hi,

 

 

thinking a bit out of the box, would the Tiler work in your case? You will certainly have a variable number of vertices per file, but for many cases might make more sense to divide the objects per tile rather than semi-randomly based on the number of vertices.

 

 

David
Yes if there is no strategy to your fanning-out by vertices, then it will be quit arbitrary.

 

 

 

But if you insist on doing so, then just chop the lines with max=1. This will give you all the vertices.

 

 

Now, try dividing the result in groups of 1000 vertices..

 

You could use a neighbourfinder iteratively (stick a neighbourfinder in a custom loop, indexing the search distance). Set it to iterate until 100 objects are grouped.

 

 

Then reset searchindex and have it start again, till there are less then 1000 objects left.

 

 

Result will totaly depend on where you set your startingpoint.

 

 

 

Yo probably want ot start more conventional, like "bottom left" or so.
Or you can order the extracted vertices using goniometry (left/right reading or visa versa, or circular with centerpoint upperleft etc.etc.)  and simply group them for every 1000, using for instance a sampler.

 

Then, i assume you are fanning out polylines and or polylines, you need to merge them to select wich are to be fanned out.

 

 

Reply