I am working on a project where I needed to study soil types at my research location. I am using SOTER. Just for record, I am working in QGIS 2.6 Brighton.
What I have ?
A shapefile (with 25 features). Each of these features have a linkfield column. this column has id that can be used as foreign key to SOTER database
SOTER database with multiple tables: Terrain, TerrainComponent, SoilComponent and Profile are the ones I am interested in.
Terrain table has 17 fields with SUID 1 to 17. "linkfield" of shapefile will be linked to this
Terrain Component table has more than 50 fields, each SUID can have 2-4 terrain components - represented by TCID column
Soilcomponent table assigns at least 2 to 4 different components to each TCID - represented by SCID. this table also has PRID in each row. Thus, each SCID of each TCID of each SUID has 1 distinct PRID that can be linked to Profile table
Profiles table has WRBC column that I am intersted in.
What have I done?
- Created relations in QGIS with following parameters
- linked SUID of Terrain to linkfield of shapefile
- linked SUID of TerrainComponent to linkfield of shapefile
- linked SUID of SoilComponent to linkfield of shapefile
- linked ProfileID (written as PRID) of Profiles table to PRID of SoilComponent
Now when I click over any feature in shapefile, (with auto-open form) I can navigate to find a column called: "WRBC" of Profile table which has the actual data that I need. I have attached a sample form of a feature of shapefile.
What do I need ?
Now I need to be able to extract all the types of PRIDs that are referred by the "linkfield" from shapefile. And I need to save this into a new table.
The format of the table could be like:
linkfield PRID WRBC 1 NP111 its value 1 NP124 its value 1 NP214 its value 2 NP623 its value 2 NP155 its value 2 NP124 its value 3 NP214 its value 3 NP623 its value
and so on...
I need this table for manual study and then later I need to reclassify this data on the basis of the value in WRBC column.
Am I doing anything wrong? If not how can I proceed?