Skip to main content
1 of 9
OgeiD
  • 618
  • 1
  • 5
  • 15

Problem with relations

I am using QGIS, version 3.24.0. I have a shapefile called "Map_CorrectionDEF", uniquely identify by fields "GID" and "unitcode". It is a grid cell, in which the field "GID" is the cell and "unitcode" the country to which the cell belongs.

On the other hand, I have a CSV file, called crop_main (no geometry), uniquely identify by "unitcode" and "cropclass", where "unitcode" refers to the country and "cropclass" the type of crop.

I present an example of my CSV file:

enter image description here

I want to connect both fields. I would like to assign to each cell the type of crop which exist in the country which the cell belongs. More specific, for each cell, which belongs to a country ("unitcode" field), I would like to join every value of my csv file with has the same value of "unitcode". The goal is to obtain for all the cells of my shape file the information of all cropland which grows in the country. Hence, all the cells of the same country should have the same number of crops.

To do it (I am not sure if the correct way), I am doing the following relations:

enter image description here

However, when I do it, I am not able to visualize the relation I am creating. According to this, https://docs.qgis.org/3.10/en/docs/user_manual/working_with_vector/attribute_table.html?#creating-one-or-many-to-many-relations "depending on your settings, the form might open directly or you will have to choose to open it in the identification dialog under actions." In my case it's not open directly, but I am not able to go to the identification dialog.

OgeiD
  • 618
  • 1
  • 5
  • 15