Skip to main content

I am flattening a complex 3D building into its outline and then I want to use its max height to extrude the footprint. This works until I want to use the max height I extracted as variable for the extrusion; instead of just using the value, the AttributeCreator (NA: ExtrudeHeight, AV: _max) creates two features, one with just the extrusion attribute + value, and the other with just the attribute, but empty. How do I just write the number into the attribute field of the geometry?

Hi @clickingbuttons,

I believe you needs to use the transformer to merger the features coming from the Dissolver and coming from DuplicateFilter.

You can use the transformer FeatureMerger before the transformer AttributeCreator.

Thanks,

Danilo


Hi @clickingbuttons,

I believe you needs to use the transformer to merger the features coming from the Dissolver and coming from DuplicateFilter.

You can use the transformer FeatureMerger before the transformer AttributeCreator.

Thanks,

Danilo

Thanks, I created a temporary join attribute for both the value and the dissolved geometry, then removed it again after the merge. Maybe there's a more direct way?


Thanks, I created a temporary join attribute for both the value and the dissolved geometry, then removed it again after the merge. Maybe there's a more direct way?

What you removed?

 

 


Thanks, I created a temporary join attribute for both the value and the dissolved geometry, then removed it again after the merge. Maybe there's a more direct way?

If the features have no identifying attribute you can use for the FeatureMerger you can use a Counter immediately after the input feature type, this counts all objects coming through and stores the count in an attribute, so you can then use that in the FeatureMerger later on (and remove it when you're done).

 

 


Hi @clickingbuttons

Is max height calculated for each building separately or is it max height of all buildings? It seems to me that @danilo_inovacao got it right: you are using StatisticsCalculator to calculate the max height of all buildings and then attempt to use it for extrusion, is that correct? If yes, you can use FeatureMerger as @danilo_inovacao suggested. You don't even need to create an extra attribute for merging, you can use e.g. 1 as Requestor and Supplier Join On value in FeatureMerger (simply type two 1s or a pair of other characters).

You might be running into problems because the feature with max height value still carries a lot of attributes from the original dataset. To avoid overwriting attribute values on the 'main features' (features with geometries, the ones you need to extrude), please make sure FeatureMerger params a set to:

  • Feature Merge Type: Attributes Only
  • Attribute Accumulation: Accumulation Mode: Merge Supplier
  • Attribute Accumulation: Conflict Resolution: Use Requestor

With these settings you won't need to use GeometryRemover or AttributeKeeper which will make your workspace more compact.

One thing I wanted to mention: you would like to get single max height value, right? Then you could use StatisticsCalculator Summary port which will output that single summary feature you will use down the stream. This will help you get rid of the DuplicateFilter (which as a matter of fact is a resource consuming transformer, i.e. it at least significantly slows down your translation).


Hi @clickingbuttons

Is max height calculated for each building separately or is it max height of all buildings? It seems to me that @danilo_inovacao got it right: you are using StatisticsCalculator to calculate the max height of all buildings and then attempt to use it for extrusion, is that correct? If yes, you can use FeatureMerger as @danilo_inovacao suggested. You don't even need to create an extra attribute for merging, you can use e.g. 1 as Requestor and Supplier Join On value in FeatureMerger (simply type two 1s or a pair of other characters).

You might be running into problems because the feature with max height value still carries a lot of attributes from the original dataset. To avoid overwriting attribute values on the 'main features' (features with geometries, the ones you need to extrude), please make sure FeatureMerger params a set to:

  • Feature Merge Type: Attributes Only
  • Attribute Accumulation: Accumulation Mode: Merge Supplier
  • Attribute Accumulation: Conflict Resolution: Use Requestor

With these settings you won't need to use GeometryRemover or AttributeKeeper which will make your workspace more compact.

One thing I wanted to mention: you would like to get single max height value, right? Then you could use StatisticsCalculator Summary port which will output that single summary feature you will use down the stream. This will help you get rid of the DuplicateFilter (which as a matter of fact is a resource consuming transformer, i.e. it at least significantly slows down your translation).

Thanks, that turned the translation a bit more compact. It was a single building.

 


if you want to save time by not using a featuremerger you can use a variable setter-retriever combo.

Set the value as soon as it is known.

Retrieve the value just before using the extruder.


Reply