[GIS] Exporting one to many relation in QGIS to new shapefile

one-to-manyqgisrelates

I am using QGIS 3.4.1-Madeira.

I have a base layer map that represents areas as polygons. I have created a CSV file with many entries of different NGO projects, and each one is coded with the ID of the spatial area it takes place. I understand I can't do a simple Join because it only joins one row of the CSV to each area polygon. I have set up a Relation in the Project Properties, which reflects the data structure I want, but I can't figure out how to make it just display in the map as a new layer.

Best Answer

Let me suggest Join attributes by field value tool (though I am conscious this is not a direct answer to your question: how to utilize your established Relation).

This tool joins two tables using key field from each table. Its Create separate feature for each matching feature (one-to-many) option allows us to create one-to-many relational table, extending (duplicating) one record to match with many other records in the other table.

enter image description here

Related Question