0

I´m looking for a smart way to merge multiple line objects with the same geometry and same position in one layer while also sum up their attribute values. enter image description here The result should be only one geometry (with the sum of all different object attributes) To merge individual activated objects via expanded digitalizing tools won´t work, because the number of different overlaying objects is much too big to do this step by step. All other merging instruments combine either only two layers or don´t sum up the attribute values (i.e. mmqgis). Also v.dissolve seems not to give usable results. Does anyone have an idea?

0

After trying more tools it was pretty easy in the end:

  1. Add the geometry attribute to each line object.
  2. Use the aggregate function and group by the new "perimeter" attribute
  3. Choose "sum"-option for the attribute where the data is in

The result is a vector layer with only one object at each line segment with summed up values.

  • Uuups, sorry! IMPORTANT! Better use the field calculator for 1. and create a unique attribute (i.e. "geom") for each object with "geom_to_wkt( $geometry )". Otherwise it could happen that objects get aggregated that have the same perimeter but are located at different positions. Then use aggregate-function with group by geom-values. sorry again, too early too happy. – stew Nov 2 '18 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.