Skip to main content
Question

Looping a list to clip features


koala_pond_03
Participant
Forum|alt.badge.img+1

Hi everyone, can you please help me out with this one? I have a vector layer with canopy heights. For example:

name, index
0-1m, 0
1-2m, 1
2-3m, 2
3-4m, 3
4-5m, 4

As the features had been captured by LiDAR, they overlap each other. I am trying to clip the features to show max canopy heights, if that makes sense. 0-1m will be clipped by canopy heights >1m, 1-2m will be clipped by canopy heights >2m, 2-3m will be clipped by canopy heights >3m, etc.

I don't understand how to set up a loop in a way that can filter and dissolve higher canopy heights. All feedback and suggestions are appreciated.

 

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • April 11, 2025

You won’t need to loop. you should be able to use the PointCloudExpressionEvaluator to build an expression that sets a component on the pc to the appropriate index

https://docs.safe.com/fme/2024.2/html/FME-Form-Documentation/FME-Transformers/Transformers/pointcloudexpressionevaluator.htm

 

even something as simple as getting the floor of the z value should give you what you need.

floor(0.7) = 0
floor(9.32) = 9
floor (10.01) = 10

 


takashi
Influencer
  • April 11, 2025

Hi ​@koala_pond_03 ,

I assume that you have polygon features with an attribute called e.g. “canopy_height” that stores the canopy height value, and you want to remove area overlapping with other higher canopy polygons from every polygon.

If I understand requirement correctly, AreaOnAreaOverlayer and list operations could be a simple solution.

  1. Send all the canopy polygon features into an AreaOnAreaOverlayer.
    • Accumulation Mode: Drop Incoming Attributes
    • Generate List: [check]
    • List Name: _list (for example)
    • Add to List: All Attributes
  2. ListSorter: Sort the list elements by canopy height desecnding.
    • List Attribute: _list{}.canopy_height
    • Sort Type: Numeric
    • Sort Order: Descending
  3. ListIndexer: Extract the first elements of the list as feature attributes.
    • List Attribute: _list{}
    • List Index to Copy: 0

Hope this helps.


koala_pond_03
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • April 17, 2025

Many thanks to ​@hkingsbury and ​@takashi for the help. I’ll look into these ideas this week. Cheers!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings