Skip to main content

Hello

I seem to be too tired or lost in confusion ... I want to set the "Output Contour Interval" in ContourGenerator via an attribute.

Problem: It only allows fixed input or a predefined parameter.

 

So I tried to put this into a Custom transformer, publish the parameter and set it from "outside" ...

BUT: no success. Also for the Custom Transformer parameter I can only use a parameter.

 

Next try: @Value(attribute_name) also doesn't work

 

I hope there is a more flexible way to control the ContourGenerator output than to put it into its' own workspace ?!

B.T.W. same situation for DEMGenerator and maybe other similar tranformers ...

 

Hi @mhab,

The ContourGenerator creates a TIN from the input features in order to generate the contours. Because the source features are all being used to create a single TIN, taking the output interval from an attribute was not thought necessary. The setting is for the entire process, not the individual input feature.

There could also be confusion if different input features had different values for the interval attribute.

I think the best solution would be to use multiple ContourGenerators in parallel, with each set to a desired interval. Add an AttributeFilter before them to route to the appropriate generator, based on the attribute value.


Hi @mhab,

The ContourGenerator creates a TIN from the input features in order to generate the contours. Because the source features are all being used to create a single TIN, taking the output interval from an attribute was not thought necessary. The setting is for the entire process, not the individual input feature.

There could also be confusion if different input features had different values for the interval attribute.

I think the best solution would be to use multiple ContourGenerators in parallel, with each set to a desired interval. Add an AttributeFilter before them to route to the appropriate generator, based on the attribute value.

Thanks for the clarification.

It makes perfect sense. At the same time it remains a problem for me though.

I read the desired value for the contourline interval from a configuration file and I am not able to use this value due to the restrictions which apply to this and similar transformers.

 


Thanks for the clarification.

It makes perfect sense. At the same time it remains a problem for me though.

I read the desired value for the contourline interval from a configuration file and I am not able to use this value due to the restrictions which apply to this and similar transformers.

 

On second thought ...

If Group By is possible and - referring to docu - different groups are treated independently then if Group By is specified, I don't see why all groups have to share the same interval.


On second thought ...

If Group By is possible and - referring to docu - different groups are treated independently then if Group By is specified, I don't see why all groups have to share the same interval.

... and on third thought

PointCloudSurfaceBuilder allows all but two parameters to be set by attributes.

No Group By possible here.

I am sorry but this is not very consistent alltogether.


What I did in similar cases was use the fmeobjects.FMEFactoryPipeline in a pythonCaller, with the relevant parameter value coming from the first feature (or first feature in group).

 

 

It's complicated, but there is a decent example on the following thread:

 

https://knowledge.safe.com/questions/24314/check-the-spatial-relationship-with-a-pythoncaller.html

What I did in similar cases was use the fmeobjects.FMEFactoryPipeline in a pythonCaller, with the relevant parameter value coming from the first feature (or first feature in group).

 

 

It's complicated, but there is a decent example on the following thread:

 

https://knowledge.safe.com/questions/24314/check-the-spatial-relationship-with-a-pythoncaller.html

Thanks for this hint. This is more or less like writing your own transformer.

I will see if I find a different hack in my scripting environment. Otherwise I may give this a try.


Thanks for this hint. This is more or less like writing your own transformer.

I will see if I find a different hack in my scripting environment. Otherwise I may give this a try.

The easiest way is to set up the transformer as close to how you want it as possible, including connecting input and output ports and then copy it to a text editor (notepad etc).

 

 

You aren't so much writing your own transformer as tweaking the setup of the existing factory.

Reply