1
$\begingroup$

I created land-use rasters for the city of Montreal for 2012, 2014, and 2016; all of which I converted from vectors to rasters in QGIS. I want to create a logit model to predict land-use changes. I was suggested to split up the data into a series of reclassified rasters with values 1 and 0 ... 1 representing a specific land use and 0 representing something other than that land use.

My thought is to frame my analysis around the neighborhood effect, whether a cell is susceptible to change as a function of the cells surrounding it.

I've installed all raster packages deemed relevant and uploaded the rasters into R:

install.packages("raster")
install.packages("sp")
install.packages("rasterVis")
install.packages("rgdal")
install.packages("dismo") #map raster on Google Map
install.packages("lulcc")

library(raster)
library(sp)
MTL_12<-raster("C:\\Users\\Senun\\Docs\\MTL\\QGIS\\MTL_12.tif")

MTL_14<-raster("C:\\Users\\Senun\\Docs\\MTL\\QGIS\\MTL_14.tif")

MTL_16<-raster("C:\\Users\\Senun\\Docs\\MTL\\QGIS\\MTL_16.tif")

All of my rasters have the same perimeters:

class       : RasterLayer 
dimensions  : 3000, 3000, 9e+06  (nrow, ncol, ncell)
resolution  : 13.03578, 11.03338  (x, y)
extent      : 267707.3, 306814.6, 5029977, 5063078  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 
data source : C:\Users\Senun\Docs\MTL\QGIS\MTL_14.tif 
names       : MTL_14 
values      : 0, 1100  (min, max) 

This is what my rasters look like plotted (it was grayscaled in QGIS): enter image description here

I have a lot of "empty space" (0) to account for.

enter image description here

I'm at a loss--this is my first time working with rasters in R--on how to proceed. I couldn't find an example or tutorial dealing with multiple rasters; furthermore I have difficulty identifying my cell values. Should I start with reclassifying my pixels?

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.