Skip to main content
Question

Using data from offset objects with condition


Forum|alt.badge.img

I have a database with polygons. The data is three buffers (dounuts) around some points of interest with a unique location id. All donuts should get data from one or two of the neighbouring donuts.

This is the starting table (first four attributes are the starting ones):

idlocation_idbuffer_nrimportance_valueimportance_value_new110111022 (10+7+5)21012712 (7+5)3101355 (5)410212034 (20+11+3)510221114 (11+3)6102333 (3)7103123-etc

My table is sorted on location_id and buffer_nr. Basically:

  • for each buffer_nr=1 I want to create a new value based on the sum of all importance_value with the same location_id
  • for each buffer_nr=2 I want to create a new value based on the sum importance_value wwith buffer_id 2 and 3.

4 replies

Forum|alt.badge.img
  • Author
  • October 27, 2018

Reverse sorting. Continously put values in global values tagged with buffer number (global.buffer3, global.buffer2 and global.buffer1). Conditional additions based on buffer number. Could that work?


takashi
Influencer
  • October 27, 2018

Once you have sorted the features by buffer_nr descending with the Sorter, you can calculate cumulative sum of the importance_value with the StatisticsCalculator. If necessary, use another Sorter to restore the original order of features.


Forum|alt.badge.img
  • Author
  • October 28, 2018
takashi wrote:

Once you have sorted the features by buffer_nr descending with the Sorter, you can calculate cumulative sum of the importance_value with the StatisticsCalculator. If necessary, use another Sorter to restore the original order of features.

This does not seem to solve the challenge of updating an attribute with data from offset objects.

 

 


takashi
Influencer
  • October 29, 2018
takashi wrote:

Once you have sorted the features by buffer_nr descending with the Sorter, you can calculate cumulative sum of the importance_value with the StatisticsCalculator. If necessary, use another Sorter to restore the original order of features.

This is the result from the workflow I posted above (just corrected a typo in the attribute name "importance_value_new"). Isn't this your desired result?

 

 


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