NCC-CNC / wtw-data-prep

Scripts to prepare data for Where To Work tool
0 stars 0 forks source link

Layer name is lost when rounding rasters in wtw_data_formatting #16

Closed edwardsmarc closed 1 year ago

edwardsmarc commented 1 year ago

The lines round(exclude_data > 0.5) and round(include_data > 0.5) cause the raster name to be reset to "layer" which then gets carried through to the WTW attributes input table.

Solution is to do this rounding explicitly using: raster::reclassify(include_data, matrix(c(-Inf,0.5,0, 0.5,Inf,1), ncol = 3, byrow = TRUE))