TransWikia.com

Error in .BIOMOD_RangeSize.check.args(CurrentPred, FutureProj, SpChange.Save) : CurrentPred & FutureProj dimensions mismatched!

Geographic Information Systems Asked by Haseeb Kamran on January 10, 2021

Colias_bin_proj_current <- 
  stack( 
    c(
      ca = "Colias.erate/proj_current/individual_projections/Colias.erate_EMcaByTSS_mergedAlgo_mergedRun_mergedData_TSSbin.img",
      wm = "Colias.erate/proj_current/individual_projections/Colias.erate_EMwmeanByTSS_mergedAlgo_mergedRun_mergedData_TSSbin.img"
    )
  )

Colias_bin_proj_2050_CC45 <- 
  stack( 
    c(
      ca = "Colias.erate/proj_2050/individual_projections/Colias.erate_EMcaByTSS_mergedAlgo_mergedRun_mergedData_TSSbin.img",
      wm = "Colias.erate/proj_2050/individual_projections/Colias.erate_EMwmeanByTSS_mergedAlgo_mergedRun_mergedData_TSSbin.img"
    )
  )

crs(Colias_bin_proj_current) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
crs(Colias_bin_proj_2050_CC45) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

resample( Colias_bin_proj_current, Colias_bin_proj_2050_CC45, method='bilinear' )

SRC_current_2050_CC45 <- 
  BIOMOD_RangeSize( Colias_bin_proj_current,
                    Colias_bin_proj_2050_CC45
                      )
   
  Colias_bin_proj_current
class      : RasterStack 
dimensions : 329, 272, 89488, 2  (nrow, ncol, ncell, nlayers)
resolution : 0.04166667, 0.04166667  (x, y)
extent     : 65.58333, 76.91667, 24.16667, 37.875  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs 
names      : ca, wm 
min values :  0,  0 
max values :  1,  1 

 Colias_bin_proj_2050_CC45
class      : RasterStack 
dimensions : 79, 101, 7979, 2  (nrow, ncol, ncell, nlayers)
resolution : 0.1666667, 0.1666667  (x, y)
extent     : 61, 77.83333, 23.83333, 37  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs 
names      : ca, wm 
min values :  0,  0 
max values :  0,  0 

I have resample the current and 2050 but I got same dimension error and my dimensions are still different. How can I solve this issue?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP