How to populate a record based on the sum of selected features on a different layer,

المشرف العام

Administrator
طاقم الإدارة
So basically here is my outlined workflow. I have a point layer and a line layer. My points have a cost value associated, and my lines represent highways. All points fall on lines, therefore I would like to iterate my selection so that I can select all points that fall on a given segment, total up the cost value from all of the points that fall on the given segment, Then I want to populate that total cost into a new field for that particular line segment.

If that was unclear, I have outlined the following steps for what I expect my script to do:

  1. I will have clipped segments (this ones easy, i've gotten this far)
  2. I will select all points that fall on a particular line segment. (this can be iterated so that it goes through all of my line segments)
  3. I will sum the cost values for all points that fall on a given line segment.
  4. I will populate that cost into a new field on the line segment record.
I know this can be done in python but I do not know what tool or script type would work better for steps 3 or 4.

Does anyone know a tool or function that will allow me to populate the originally selected line segment with a summed up value from the point layer?



أكثر...
 
أعلى