Tuesday 25 October 2016

Createing polygon layer from point data using QGIS?


I'm currently using QGIS 1.8.0


I would like to create a polygon layer from a point dataset, where the size of the polygons relates to the resolution of the grid reference.


The ultimate aim would be mapping species density - I have a numerous spreadsheets of species presence at certain locations but with differing resolutions (2km, 1km and 100m). So, I would like polygons of each grid square, so that the number of different species recorded within that square can be counted. I believe this is a similar method to how the NBN Gateway maps using their new interactive map http://www.nbn.org.uk/



Answer



I've worked it out...with great thanks to Luke's previous post!


Firstly, follow Luke's answer creating a Vector Grid with the resolution desired (as found in the species dataset) and perform a spatial analysis using intersect.


Secondly, go to Vector>Analysis Tools>points in polygon and save the output shapefile. This will add a new column in attributes (called PNTCNT) to the vector grid polygon layer made earlier (but all as a new layer).....It has added how many data points there were for each grid square together. Change style to graduated with a colour ramp...and TA DA a species density grid.


CONS: 1. All the species data in the database needs to be the same resolution (either 2km, 1km or 100m etc). The only way I see to get round this is make multiple vector grids at different resolutions and count the resolutions separately. 2. The original species records are not held within the new polygon layer. A solution could be to either come up with a table join or make a link to the species database.



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...