I have a point layer that shows the distribution of a species.
Is it possible in QGIS to convert this point layer to a raster grid in which the value of each cell corresponds with the amount of points within that cell?
Until now, I only managed to attach attribute values to the grid cells. I have already added a column in my attribute table that has the value '1' for each point, hoping that there is a way to use a sum of attributes for each grid cell.
Answer
This is a kludge but it does work - haven't found a way to go directly from points to raster yet (but am hoping someone gives a solution here!).
Starting with a point grid (random points in the Serengeti from the Vector|Research tools|Random points
tool):
Create a polygonal grid of the same extent and cell size as the raster you'd like to have (this from Vector|Research tools|Vector grid
):
Use Vector|Analysis tools|Points in polygon
, using the polygon grid and the point layer:
This gives you a new grid (here colour coded by the number of points in each polygon cell):
Now use Raster|Conversion|Rasterize
to convert this to a raster, using the PNTCNT attribute for the raster values and the same cell size as chosend for the grid:
... giving a raster with values as per the points in each cell:
No comments:
Post a Comment