1

For my research, I have collected a bunch of climatic data from my state in vector form. I also have my raster data, which is about 60 points around the state that have a binary assignment of yes/no. I'm trying to find out what climatic factors correlate with a point being either 'yes' or 'no'. My adviser suggested I rasterize my vector layers to 50m units and then start my analysis using that information.

My question is technical: Is there a way to rasterize the entire map and collection of layers together, so that each point has an even chunk of each layer? Also, after rasterizing, can I export a CSV with the information generated for my analysis? (I know it would be huge)

2
  • not sure I'm on the right track, but it sounds like you want the resulting rasterized layers to align to the same relative grid? if so ( I dont use qgis myself), but this question might help gis.stackexchange.com/questions/316056/…
    – Zipper1365
    Commented Dec 22, 2020 at 20:49
  • Do you need to rasterize your vectors, or could you sample your raster at the points? Look in the Processing Toolbox at 'Sample Raster Values'. This will create a point layer with a feature at every input point. A few spatial joins should then give you a table with all layers. Export the layer as CSV and open in a spreadsheet, process with code, etc.
    – wingnut
    Commented Apr 25, 2021 at 2:06

1 Answer 1

0

I'm a little confused - you say you have raster data:

"I also have my raster data, which is about 60 points around the state..."

This would be point data, no?

Regardless, I would encourage you to look into some of the spatial libraries in R. For example, the raster library contains a function called "rasterize", which could be what you're looking for to convert the polygons to raster objects.

https://www.rdocumentation.org/packages/raster/versions/2.8-19/topics/rasterize

I would also call your attention to some of the stacking functions, like stack(), which allow to you to stack raster layers as one object. (Stacking might make the most sense if it's the same variable through time.)

Likewise, you could partition the raster layer in whatever way you see fit. It sounds like your point data is rather evenly distributed. If so, you could build a polygon object around each one, then use the crop() and mask() functions to filter out data outside the polygon.

Creating polygons in R: https://rstudio-pubs-static.s3.amazonaws.com/202536_7a122ff56e9f4062b6b012d9921afd80.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.