Skip to main content
Question

Using data from offset objects with condition

  • October 27, 2018
  • 4 replies
  • 12 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

Forum|alt.badge.img
  • Author
  • 4 replies
  • 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
Celebrity
  • 7843 replies
  • 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
  • 4 replies
  • October 28, 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.

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

 

 


takashi
Celebrity
  • 7843 replies
  • October 29, 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.

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?