Monday 29 July 2019

Spatially joining polygon fields onto point layer in QGIS?


I have gridded depth points in CSV format that I'm trying to add other map data to, in additional columns. I've tried joining fields, hoping that I could link the Shapefile data to the csv, but when I try to display the csv by graduated symbols based on the new fields, it goes blank. I used Nathan's tips from here, but imported the csv as csv since I want to add map info to that, rather than adding csv info to a map.


See this picture below for the sea bottom temperature & salinity voronois by month, underneath the csv points (a sample subset), with the joins already made. I added columns on the csv for each of the fields i'm intending to append.


DESCRIPTION


I also tried spatial joins as per this however it says the layers aren't the same CRS (I checked, they are), then gets to 15% and hangs.



I also also tried spatial join through mmqgis but it hit a python error. I can try this again and look to debug the problem if this is the right way to go.


In short: appending polygon data as fields on a points-grid csv: what's the best way in QGIS 2.0?



Answer



The best tool for this job in my experience is Add polygon attributes to points in the Processing toolbox. If it does not work directly with the CSV, just save the points to a Shapefile before you run the spatial join.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...