How to get all attributes from overlapping polygons with identical geometry into one single polygon in QGIS
If you are using QGIS2.18, concatenate()
function in Aggregate group may be helpful.
- Suppose I have a polygon layer of 5 duplicated stars (
id
: 1-5) and one rectangle (id
:10) and each stores value I want inmyvalue
field.
- I open
Field Calculator
and create a new text field by an expressionconcatenate( to_string("myvalue") , group_by:= geom_to_wkt($geometry), concatenator:= ', ')
to store allmyvalue
from the overlapping features.
- Then my new field has the same texts if the geometries are identical.
- Remove duplicates. I like
MMQGIS
plugin's `Delete Duplicate Geometries' but there would be various ways.
Done. Maybe I will delete myvalue
field later.
What you need is spatial join. Go to Vector -> Data Management Tools -> Join attribute by location: Select your target layer where you want the attributes to show and join vector layer whose attribute you want. Also keep in mind that both the layers should have same CRS. Select your geometric predicate (which I think would be intersect). Select your attribute summary (Take attributes of the first located feature) and you are done. :)
Detailed Workflow: https://maps.cga.harvard.edu/qgis_1-7/wkshop/join_spatial.php