Skip to main content
Solved

Filter out or delete list values


Forum|alt.badge.img

Hi,

I have a polygon layer with x,y,z coordinates.

For each polygon, I would like to calculate the mean z-value. For this I use the ListStatisticsCalculator, which works perfectly.

The problem is, that some polygons consists of one or more useless z-value (-999, -9999 etc.). I would like to filter out these values (or delete them) before running it through the ListStatisticsCalculator.

I have tried the ListElementFilter with Filter Type Numeric Range, but I can't get it to work properly.

Any thoughts?

Thanks,

Stig

Best answer by david_r

How have you configured the ListElementFilter? This example works for me, removing all list values outside the range 0-99. Notice the paranthesis around the match expression, otherwise it won't work as expected:

View original
Did this help you find an answer to your question?

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

The easiest and most elegant way (in terms of Best Practices) would be to remove those values before building the list. A Tester or TestFilter can be used for that.


david_r
Evangelist
  • Best Answer
  • May 2, 2018

How have you configured the ListElementFilter? This example works for me, removing all list values outside the range 0-99. Notice the paranthesis around the match expression, otherwise it won't work as expected:


Forum|alt.badge.img
  • Author
  • May 2, 2018
redgeographics wrote:

The easiest and most elegant way (in terms of Best Practices) would be to remove those values before building the list. A Tester or TestFilter can be used for that.

Wouldn't I need to extract the coordinates before doing that? The way I do it now, is to create lists with all coordinates in the CoordinateExtractor.

 

How do I remove z-values with the Tester, if there is no attribute containing all z-values?

 

 


Forum|alt.badge.img
  • Author
  • May 2, 2018
david_r wrote:

How have you configured the ListElementFilter? This example works for me, removing all list values outside the range 0-99. Notice the paranthesis around the match expression, otherwise it won't work as expected:

I thought I had configured it the right way, but I forgot the parenthesis. Doh!

 

 

I works perfectly now. Thanks.

 


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