Skip to main content
Solved

Add until a certain value is reached


Forum|alt.badge.img

Hi there!

 

I am working on a specific analysis. This analysis needs to calculate 13 000 ha of parcels (area) randomly and then assign a new attribute value to this.

Right now I have the following workflow:

I thought I could make this work by calculating the percentage and then use the Sampler to randomly select parcels, but this doesn't work because the sum of ha does not add up.

What I am looking for is a tool that allows me to use the following formula:

"Random amount of parcels added up" = 13 000 ha

So I guess it is a randomized sampler using a certain value based on attribute values.

 

Does anyone have any idea how to do this?

 

Thank you so much in advance!

Best answer by ebygomm

Could you add a random number to all your features, sort by the random number to create a random order, then use the cumulative output of a statistics calculator and test for any cumulative area below 13,000 ha. The ones that pass are your "random amount of parcels"

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

2 replies

cdalessandro
Participant
Forum|alt.badge.img+4
  • Participant
  • January 13, 2020

I think it is enough use StatisticCalculator transformer using cumulative port. I wrote a simple example for You

are_added_up.fmw


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • Best Answer
  • January 13, 2020

Could you add a random number to all your features, sort by the random number to create a random order, then use the cumulative output of a statistics calculator and test for any cumulative area below 13,000 ha. The ones that pass are your "random amount of parcels"


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