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)


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.


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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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