2

Issue:

I have calculated the distance from shore from point data showing dolphin IDs to the coastline by using these commands:

Step 1: Digitise the country lines for administration country shapefiles into line data

Vector - Geometry tools - Polygons to Lines

Step 2: Turn the line data into point data

Vector - Geometry tools - Extract Vertices

Step 3: Calculate the distance to the coast

Processing tools - Toolbox - Distance to nearest Hub

Now I have two attribute tables. The first attribute table is my point data showing dolphin IDs', and the second attribute table shows the 'Hubdistance' from the ' dolphin ID' to the coastline.**

Both attribute tables have two columns in common called 'FID' and 'ID'. I would like to export all the data eventually into a .csv file, hence this is why I would like all of my fields to be in one attribute table.

Does anyone know how I can join the column Hubdistance (line data attribute table) to my attribute table showing point data for my dolphin IDs?

Line data attribute table showing Hubdistance:

Both attribute tables have fields fid and id in common.

enter image description here

The shapefile attribute table showing dolphin IDs

enter image description here

3
  • 2
    Can you please show how does your data look like? Did you try the Join in QGIS : qgistutorials.com/en/docs/3/performing_table_joins.html
    – Taras
    Commented May 16, 2022 at 5:10
  • Hello Taras, I added screenshots showing the fields in both of my attribute tables. I hope this helps. Commented May 16, 2022 at 15:33
  • Unfortunately, I do not see two fields "FID" and "ID" in the 'Motenegro_Hub_distance' table. Otherwise you can work with a Virtual Layer, like: SELECT d.*, h.* FROM "dolphin" AS d LEFT JOIN "hubdistance" AS h ON d.FID||d.ID = h.FID||h.ID;
    – Taras
    Commented May 17, 2022 at 10:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.