|
| 1 | +library(dplyr) |
| 2 | +library(data.table) |
| 3 | +library(testthat) |
| 4 | +#Add links to datasets |
| 5 | +#1. The original dataset |
| 6 | +Original_LDS_Data<-read.csv("D:/MOIRAI/moirai/outputs/basins235/Land_type_area_ha.csv",skip = 5) |
| 7 | +#2. Updated dataset |
| 8 | +Updated_LDS_Data<-read.csv("D:/MOIRAI_3.1_Final/moirai/ancillary/Land_type_area_ha _Updated_withIUCN_Categories.csv",skip = 5) |
| 9 | +#3. Old land types |
| 10 | +MOIRAI_Types_old<-read.csv("D:/MOIRAI/moirai/outputs/basins235/MOIRAI_land_types.csv",skip=4) |
| 11 | +#4. New land types |
| 12 | +MOIRAI_Types_new<-read.csv("D:/MOIRAI_3.1_Final/moirai/outputs/basins235_lulcc/MOIRAI_land_types.csv",skip = 4) |
| 13 | +#Add fast group_by function |
| 14 | +fast_group_by<- function(df,by,colname="value",func= "sum"){ |
| 15 | +#Convert relevant column to numeric |
| 16 | +df[,colname]<- as.numeric(df[,colname]) |
| 17 | +#Store as data.table |
| 18 | +df <- as.data.table(df) |
| 19 | +#Complete operations |
| 20 | +df<- df[, (colname) := (get(func)(get(colname))), by] |
| 21 | +#Save back to tibble |
| 22 | +df<- as_tibble(df) |
| 23 | +return(df) |
| 24 | +} |
| 25 | +#First compare by Country_Year |
| 26 | +Original_LDS_Data %>% |
| 27 | +fast_group_by(by=c("iso","year"),colname = "value",func="sum") %>% |
| 28 | +select(iso,year,value) %>% |
| 29 | +distinct()->ISO_Year_Data_Old |
| 30 | +Updated_LDS_Data %>% |
| 31 | +fast_group_by(by=c("iso","year"),colname = "value",func="sum") %>% |
| 32 | +select(iso,year,value) %>% |
| 33 | +rename(Updated_Value=value) %>% |
| 34 | +distinct()->ISO_Year_Data_New |
| 35 | +test_that("Compare difference by year and value",{ |
| 36 | +expect_equal(ISO_Year_Data_Old$value,ISO_Year_Data_New$Updated_Value,tolerance=0.01,info=paste("ISO year differences are too high.")) |
| 37 | +}) |
| 38 | +#Compare by iso,glu,year |
| 39 | +Original_LDS_Data %>% |
| 40 | +fast_group_by(by=c("iso","glu_code","year"),colname = "value",func="sum") %>% |
| 41 | +select(iso,glu_code,year,value) %>% |
| 42 | +distinct()->ISO_GLU_Year_Data_Old |
| 43 | +Updated_LDS_Data %>% |
| 44 | +fast_group_by(by=c("iso","glu_code","year"),colname = "value",func="sum") %>% |
| 45 | +select(iso,glu_code,year,value) %>% |
| 46 | +rename(Updated_Value=value) %>% |
| 47 | +distinct()->ISO_GLU_Year_Data_New |
| 48 | +test_that("Compare difference by year and value",{ |
| 49 | +expect_equal(ISO_GLU_Year_Data_Old$value,ISO_GLU_Year_Data_New$Updated_Value,tolerance=0.01,info=paste("ISO year differences are too high.")) |
| 50 | +}) |
| 51 | +#Compare Hyde type |
| 52 | +Original_LDS_Data %>% |
| 53 | +left_join(MOIRAI_Types_old %>% select(Category,LT_HYDE) %>% rename(land_type=Category),by=c("land_type")) %>% |
| 54 | +fast_group_by(by=c("iso","glu_code","LT_HYDE","year"),colname = "value",func="sum") %>% |
| 55 | +select(iso,glu_code,year,LT_HYDE,value) %>% |
| 56 | +distinct() %>% |
| 57 | +filter(value>2)->ISO_GLU_LT_Year_Data_Old |
| 58 | +Updated_LDS_Data %>% |
| 59 | +left_join(MOIRAI_Types_new %>% select(Category,LT_HYDE) %>% rename(land_type=Category),by=c("land_type")) %>% |
| 60 | +fast_group_by(by=c("iso","glu_code","LT_HYDE","year"),colname = "value",func="sum") %>% |
| 61 | +select(iso,glu_code,year,LT_HYDE,value) %>% |
| 62 | +rename(Updated_Value=value) %>% |
| 63 | +distinct() %>% |
| 64 | +filter(Updated_Value>2)->ISO_GLU_LT_Year_Data_New |
| 65 | +ISO_GLU_LT_Year_Data_Old %>% left_join(ISO_GLU_LT_Year_Data_New,by=c("iso","glu_code","LT_HYDE","year")) %>% |
| 66 | +mutate(Difference=Updated_Value-value) %>% |
| 67 | +mutate(Difference_Percent=(Difference/value)*100) %>% |
| 68 | +filter(value>50)->tmp |
| 69 | +#Compare Hyde type |
| 70 | +Original_LDS_Data %>% |
| 71 | +left_join(MOIRAI_Types_old %>% select(Category,LT_HYDE,LT_SAGE) %>% rename(land_type=Category),by=c("land_type")) %>% |
| 72 | +fast_group_by(by=c("iso","glu_code","LT_HYDE","year","LT_SAGE"),colname = "value",func="sum") %>% |
| 73 | +select(iso,glu_code,year,LT_HYDE,value,LT_SAGE) %>% |
| 74 | +distinct() %>% |
| 75 | +filter(value>2)->ISO_GLU_LT_Year_Data_Old |
| 76 | +Updated_LDS_Data %>% |
| 77 | +left_join(MOIRAI_Types_new %>% select(Category,LT_HYDE,LT_SAGE) %>% rename(land_type=Category),by=c("land_type")) %>% |
| 78 | +fast_group_by(by=c("iso","glu_code","LT_HYDE","year","LT_SAGE"),colname = "value",func="sum") %>% |
| 79 | +select(iso,glu_code,year,LT_HYDE,value,LT_SAGE) %>% |
| 80 | +rename(Updated_Value=value) %>% |
| 81 | +distinct() %>% |
| 82 | +filter(Updated_Value>2)->ISO_GLU_LT_Year_Data_New |
| 83 | +ISO_GLU_LT_Year_Data_Old %>% left_join(ISO_GLU_LT_Year_Data_New,by=c("iso","glu_code","LT_HYDE","year","LT_SAGE")) %>% |
| 84 | +mutate(Difference=Updated_Value-value) %>% |
| 85 | +mutate(Difference_Percent=(Difference/value)*100) %>% |
| 86 | +filter(value>5)->tmp |
| 87 | +library(ggplot2) |
| 88 | +g<-ggplot(data=tmp,aes(x=tmp$value,y=tmp$Updated_Value))+ |
| 89 | +geom_point() |
| 90 | +g |
| 91 | +View(tmp) |
| 92 | +g<-ggplot(data=tmp,aes(x=value,y=Updated_Value))+ |
| 93 | +geom_point()+ |
| 94 | +ggtitle("Comparing LDS outputs between old and new across all years") |
| 95 | +g<-ggplot(data=tmp,aes(x=tmp$value,y=tmp$Updated_Value))+ |
| 96 | +g |
| 97 | +g<-ggplot(data=tmp,aes(x=value,y=Updated_Value))+ |
| 98 | +geom_point()+ |
| 99 | +ggtitle("Comparing LDS outputs between old and new across all years") |
| 100 | +g |
| 101 | +View(tmp) |
| 102 | +ISO_GLU_LT_Year_Data_Old %>% left_join(ISO_GLU_LT_Year_Data_New,by=c("iso","glu_code","LT_HYDE","year","LT_SAGE")) %>% |
| 103 | +mutate(Difference=abs(Updated_Value-value)) %>% |
| 104 | +mutate(Difference_Percent=(Difference/value)*100) %>% |
| 105 | +filter(value>5)->tmp |
| 106 | +tmp %>% filter(Difference>5)->Data_for_comparison |
| 107 | +View(tmp) |
| 108 | +ISO_GLU_LT_Year_Data_Old %>% left_join(ISO_GLU_LT_Year_Data_New,by=c("iso","glu_code","LT_HYDE","year","LT_SAGE")) %>% |
| 109 | +mutate(Difference=abs(Updated_Value-value)) %>% |
| 110 | +mutate(Difference_Percent=(Difference/value)*100) %>% |
| 111 | +filter(value>5)->tmp |
| 112 | +tmp %>% filter(Difference>5)->Data_for_comparison |
| 113 | +View(Data_for_comparison) |
| 114 | +View(Data_for_comparison) |
| 115 | +View(Data_for_comparison) |
| 116 | +View(Data_for_comparison) |
| 117 | +tmp %>% filter(Difference>5) %>% filter(Difference_Percent>15)->Data_for_comparison |
| 118 | +View(Data_for_comparison) |
| 119 | +tmp %>% filter(Difference>5) %>% filter(Difference_Percent>12)->Data_for_comparison |
| 120 | +View(Data_for_comparison) |
| 121 | +tmp %>% filter(Difference>5) %>% filter(Difference_Percent>15)->Data_for_comparison |
| 122 | +test_that("Compare difference at lowest level",{ |
| 123 | +expect(sum(nrow(Data_for_comparison))=0,info=paste("Differences at the lowest level are not reasonable")) |
| 124 | +}) |
| 125 | +test_that("Compare difference at lowest level",{ |
| 126 | +expect_equal(sum(nrow(Data_for_comparison)),0,info=paste("Differences at the lowest level are not reasonable")) |
| 127 | +}) |
| 128 | +tmp %>% filter(year=1990) %>% filter(iso=="idn")->Indonesia_anomaly |
| 129 | +tmp %>% filter(year==1990) %>% filter(iso=="idn")->Indonesia_anomaly |
| 130 | +write.csv(Indonesia_anomaly,"Indonesia_anomaly.csv") |
| 131 | +#5. Old carbon file |
| 132 | +Old_Carbon_Data<- read.csv("D:/MOIRAI/moirai/outputs/basins235/Ref_veg_carbon_Mg_per_ha.csv") |
| 133 | +#6. New carbon file |
| 134 | +New_Carbon_Data<- read.csv("D:/MOIRAI_3.1_Final/moirai/outputs/basins235_lulcc/Ref_veg_carbon_Mg_per_ha.csv") |
| 135 | +colnames(Old_Carbon_Data) |
| 136 | +#5. Old carbon file |
| 137 | +Old_Carbon_Data<- read.csv("D:/MOIRAI/moirai/outputs/basins235/Ref_veg_carbon_Mg_per_ha.csv",skip = 5) |
| 138 | +#6. New carbon file |
| 139 | +New_Carbon_Data<- read.csv("D:/MOIRAI_3.1_Final/moirai/outputs/basins235_lulcc/Ref_veg_carbon_Mg_per_ha.csv",skip = 5) |
| 140 | +colnames(Old_Carbon_Data) |
| 141 | +colnames(Original_LDS_Data) |
| 142 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 143 | +Old_Carbon_Data %>% |
| 144 | +inner_join(Original_LDS_Data %>% |
| 145 | +filter(year=2015) %>% |
| 146 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 147 | +mutate(Old_Carbon_Total = Land_value * value ) |
| 148 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 149 | +Old_Carbon_Data %>% |
| 150 | +inner_join(Original_LDS_Data %>% |
| 151 | +filter(year==2015) %>% |
| 152 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 153 | +mutate(Old_Carbon_Total = Land_value * value ) |
| 154 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 155 | +Old_Carbon_Data %>% |
| 156 | +inner_join(Original_LDS_Data %>% |
| 157 | +filter(year==2015) %>% |
| 158 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 159 | +mutate(Old_Carbon_Total = Land_value * value )->Old_Total_Carbon |
| 160 | +View(Old_Total_Carbon) |
| 161 | +New_Carbon_Data %>% |
| 162 | +inner_join(Updated_LDS_Data %>% |
| 163 | +filter(year==2015) %>% |
| 164 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 165 | +mutate(New_Carbon_Total = Land_value * value )->New_Total_Carbon |
| 166 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 167 | +Old_Carbon_Data %>% |
| 168 | +inner_join(Original_LDS_Data %>% |
| 169 | +filter(year==2015) %>% |
| 170 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 171 | +mutate(Old_Carbon_Total = Land_value * value ) %>% |
| 172 | +group_by(iso,glu_code,c_type) %>% |
| 173 | +mutate(Old_Carbon_Total=sum(Old_Carbon_Total))->Old_Total_Carbon |
| 174 | +New_Carbon_Data %>% |
| 175 | +inner_join(Updated_LDS_Data %>% |
| 176 | +filter(year==2015) %>% |
| 177 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 178 | +mutate(New_Carbon_Total = Land_value * value ) %>% |
| 179 | +group_by(iso,glu_code,c_type) %>% |
| 180 | +mutate(New_Carbon_Total=sum(New_Carbon_Total))->New_Total_Carbon |
| 181 | +View(New_Total_Carbon) |
| 182 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 183 | +Old_Carbon_Data %>% |
| 184 | +inner_join(Original_LDS_Data %>% |
| 185 | +filter(year==2015) %>% |
| 186 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 187 | +mutate(Old_Carbon_Total = Land_value * value ) %>% |
| 188 | +group_by(iso,glu_code,c_type) %>% |
| 189 | +mutate(Old_Carbon_Total=sum(Old_Carbon_Total)) %>% |
| 190 | +select(iso,glu_code,c_type,Old_Carbon_Total) %>% |
| 191 | +distinct()->Old_Total_Carbon |
| 192 | +New_Carbon_Data %>% |
| 193 | +inner_join(Updated_LDS_Data %>% |
| 194 | +filter(year==2015) %>% |
| 195 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 196 | +mutate(New_Carbon_Total = Land_value * value ) %>% |
| 197 | +group_by(iso,glu_code,c_type) %>% |
| 198 | +mutate(New_Carbon_Total=sum(New_Carbon_Total)) %>% |
| 199 | +select(iso,glu_code,c_type,New_Carbon_Total) %>% |
| 200 | +distinct()->New_Total_Carbon |
| 201 | +#Part 2: Carbon accounting for soil_carbon, vegetation carbon |
| 202 | +Old_Carbon_Data %>% |
| 203 | +inner_join(Original_LDS_Data %>% |
| 204 | +filter(year==2015) %>% |
| 205 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 206 | +mutate(Old_Carbon_Total = Land_value * value ) %>% |
| 207 | +group_by(iso,glu_code,c_type) %>% |
| 208 | +mutate(Old_Carbon_Total=sum(Old_Carbon_Total)) %>% |
| 209 | +select(iso,glu_code,c_type,Old_Carbon_Total) %>% |
| 210 | +distinct()->Old_Total_Carbon |
| 211 | +New_Carbon_Data %>% |
| 212 | +inner_join(Updated_LDS_Data %>% |
| 213 | +filter(year==2015) %>% |
| 214 | +select(iso,glu_code,land_type,value) %>% rename(Land_value=value), by=c("iso","glu_code","land_type")) %>% |
| 215 | +mutate(New_Carbon_Total = Land_value * value ) %>% |
| 216 | +group_by(iso,glu_code,c_type) %>% |
| 217 | +mutate(New_Carbon_Total=sum(New_Carbon_Total)) %>% |
| 218 | +select(iso,glu_code,c_type,New_Carbon_Total) %>% |
| 219 | +distinct()->New_Total_Carbon |
| 220 | +New_Total_Carbon %>% |
| 221 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 222 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total)) %>% |
| 223 | +mutate(Percent_Difference=(Difference/Old_Total_Carbon)*100)->Carbon_Comparison |
| 224 | +New_Total_Carbon %>% |
| 225 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) |
| 226 | +New_Total_Carbon %>% |
| 227 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type"))->t |
| 228 | +New_Total_Carbon %>% |
| 229 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 230 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total))->t |
| 231 | +New_Total_Carbon %>% |
| 232 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 233 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total)) %>% |
| 234 | +mutate(Percent_Difference=(Difference/Old_Carbon_Total)*100)->Carbon_Comparison |
| 235 | +g<-ggplot(data=Carbon_Comparison,aes(x=Old_Carbon_Total,y=New_Carbon_Total))+ |
| 236 | +geom_point()+ |
| 237 | +ggtitle("Comparing carbon outputs between old and new across all years")+ |
| 238 | +labs(subtitle = "This is a comparison at the lowest level i.e Year+ISO+GLU+SAGE_type+Hyde_type")+ |
| 239 | +facet_wrap(~c_type) |
| 240 | +g |
| 241 | +View(Carbon_Comparison) |
| 242 | +median(Carbon_Comparison$New_Carbon_Total) |
| 243 | +New_Total_Carbon %>% |
| 244 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 245 | +mutate(New_Carbon_Total=if_else(is.na(New_Carbon_Total,0,New_Carbon_Total))) %>% |
| 246 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total)) %>% |
| 247 | +mutate(Percent_Difference=(Difference/Old_Carbon_Total)*100)->Carbon_Comparison |
| 248 | +New_Total_Carbon %>% |
| 249 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 250 | +mutate(New_Carbon_Total=if_else(is.na(New_Carbon_Total),0,New_Carbon_Total)) %>% |
| 251 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total)) %>% |
| 252 | +mutate(Percent_Difference=(Difference/Old_Carbon_Total)*100)->Carbon_Comparison |
| 253 | +New_Total_Carbon %>% |
| 254 | +inner_join(Old_Total_Carbon,by=c("iso","glu_code","c_type")) %>% |
| 255 | +mutate(New_Carbon_Total=ifelse(is.na(New_Carbon_Total),0,New_Carbon_Total)) %>% |
| 256 | +mutate(Difference=abs(New_Carbon_Total-Old_Carbon_Total)) %>% |
| 257 | +mutate(Percent_Difference=(Difference/Old_Carbon_Total)*100)->Carbon_Comparison |
| 258 | +g<-ggplot(data=Carbon_Comparison,aes(x=Old_Carbon_Total,y=New_Carbon_Total))+ |
| 259 | +geom_point()+ |
| 260 | +ggtitle("Comparing carbon outputs between old and new across all years")+ |
| 261 | +labs(subtitle = "This is a comparison at the lowest level i.e Year+ISO+GLU+SAGE_type+Hyde_type")+ |
| 262 | +facet_wrap(~c_type) |
| 263 | +g |
| 264 | +View(Carbon_Comparison) |
| 265 | +median(Carbon_Comparison$New_Carbon_Total) |
| 266 | +Carbon_Comparison %>% filter(Difference>1000000)->t |
| 267 | +View(t) |
| 268 | +Carbon_Comparison %>% filter(Difference>4000000) %>% |
| 269 | +filter(Percent_Difference>15)->Carbon |
| 270 | +View(Carbon) |
| 271 | +Carbon_Comparison %>% filter(iso=="ecu") %>%filter(c_type=="soil_c")->Ecuador_example |
| 272 | +View(Ecuador_example) |
| 273 | +write.csv(Ecuador_example,"Ecuador_example.csv") |
| 274 | +ISO_GLU_LT_Year_Data_Old %>% left_join(ISO_GLU_LT_Year_Data_New,by=c("iso","glu_code","LT_HYDE","year","LT_SAGE")) %>% |
| 275 | +mutate(Difference=abs(Updated_Value-value)) %>% |
| 276 | +mutate(Difference_Percent=(Difference/value)*100) %>% |
| 277 | +filter(value>5)->tmp |
| 278 | +g<-ggplot(data=tmp,aes(x=value,y=Updated_Value))+ |
| 279 | +geom_point()+ |
| 280 | +ggtitle("Comparing LDS outputs between old and new across all years")+ |
| 281 | +labs(subtitle = "This is a comparison at the lowest level i.e Year+ISO+GLU+SAGE_type+Hyde_type") |
| 282 | +g |
| 283 | +library(rgdal) |
| 284 | +library(raster) |
| 285 | +GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 286 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 287 | +gdalinfo |
| 288 | +?gdal_translate |
| 289 | +??gdal_translate |
| 290 | +library(rgdal) |
| 291 | +library(raster) |
| 292 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 293 | +gdal_translate() |
| 294 | +library(gdal) |
| 295 | +library(rgdal) |
| 296 | +??gdal_translate |
| 297 | +rgdal::gdalwarp |
| 298 | +gdal_warp |
| 299 | +install.packages("gdalUtils") |
| 300 | +library(gdalUtils) |
| 301 | +??gdal_translate |
| 302 | +gdal_translate(src_dataset = "D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif", dst_dataset = "tmp.bil",of="ENVI") |
| 303 | +gdalwarp(srcfile = "D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif",dstfile = "tmp.tif",srcnodata = 2147483647,dstnodata = 0) |
| 304 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/All_IUCN.tif") |
| 305 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/All_IUCN.tif") |
| 306 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 307 | +gdalinfo |
| 308 | +gdalwarp(srcfile = "D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif",dstfile = "tmp.tif",srcnodata = 2147483647,dstnodata = 0) |
| 309 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 310 | +gdalwarp(srcfile = "D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif",dstfile = "tmp.tif",srcnodata = 2147483647,dstnodata = 0) |
| 311 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 312 | +gdalinfo<-GDALinfo("D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif") |
| 313 | +gdalinfo |
| 314 | +gdalwarp(srcfile = "D:/MOIRAI/moirai/EPA/AgLands_IUCN_All_IUCN.tif",dstfile = "tmp.tif",srcnodata = 2147483647,dstnodata = 0) |
0 commit comments