@@ -110,7 +110,7 @@ test_that("Function: extractToRast: raster reprojecting", {
110110 input <- terra :: rast(file.path(testDirs $ testdata , " extractToRast" , " tile1.tif" ))
111111
112112 templateRast <- terra :: rast(
113- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-4326.prj" ),
113+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-4326.prj" ),
114114 ncols = 213 , nrows = 215 , vals = 1 ,
115115 ext = c(xmin = - 105.6567825386380974 , xmax = - 105.6294401406081107 ,
116116 ymin = 55.1008597705739831 , ymax = 55.1284589047357017 ))
@@ -176,11 +176,11 @@ test_that("Function: extractToRast: coverage with NAs", {
176176
177177 # Test: without reprojection
178178 inputTemplate <- terra :: rast(
179- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-3979.prj" ),
179+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-3979.prj" ),
180180 res = 5 , vals = 1 ,
181181 xmin = 0 , ymin = 0 , xmax = 10 , ymax = 10 )
182182 templateRast <- terra :: rast(
183- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-3979.prj" ),
183+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-3979.prj" ),
184184 res = 10 , vals = 1 ,
185185 xmin = 0 , ymin = 0 , xmax = 10 , ymax = 10 )
186186
@@ -206,22 +206,22 @@ test_that("Function: extractToRast: coverage with NAs", {
206206
207207 # # > 50% coverage NA in 1 pixel
208208 input <- terra :: rast(
209- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-3979.prj" ),
209+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-3979.prj" ),
210210 res = 8 , vals = c(NA , NA , 1 , NA ),
211211 xmin = 0 , ymin = 0 , xmax = 16 , ymax = 16 )
212212 expect_equal(extractToRast(input , templateRast ), 1 )
213213
214214 # Test: with reprojection
215215 inputTemplate <- terra :: rast(
216- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-3979.prj" ),
216+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-3979.prj" ),
217217 res = 100 , vals = 1 ,
218218 xmin = - 663200 ,
219219 xmax = - 663000 ,
220220 ymin = 729200 ,
221221 ymax = 729400
222222 )
223223 templateRast <- terra :: rast(
224- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-102001.prj" ),
224+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-102001.prj" ),
225225 res = 100 , vals = 1 ,
226226 xmin = - 607300 ,
227227 xmax = - 607200 ,
@@ -241,7 +241,7 @@ test_that("Function: extractToRast: coverage with NAs", {
241241
242242 # # > 50% coverage NA in 1 large area
243243 input <- terra :: rast(
244- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-3979.prj" ),
244+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-3979.prj" ),
245245 res = 100 , vals = c(1 , NA , NA , NA ),
246246 xmin = - 663200 + 50 ,
247247 xmax = - 663000 + 50 ,
@@ -321,7 +321,7 @@ test_that("Function: extractToRast: sf polygons with numeric field: reproject",
321321 input <- subset(input , id != 8 )
322322
323323 templateRast <- terra :: rast(
324- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-32613.prj" ),
324+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-32613.prj" ),
325325 res = 10 , vals = 1 ,
326326 ext = c(xmin = 456000 , xmax = 461000 , ymin = 6105000 , ymax = 6110000 ))
327327
@@ -347,7 +347,7 @@ test_that("Function: extractToRast: sf polygons with text field: reproject", {
347347 input $ id <- paste(" Id" , input $ id )
348348
349349 templateRast <- terra :: rast(
350- crs = file.path(testDirs $ testdata , " extractToRast " , " EPSG-32613.prj" ),
350+ crs = file.path(testDirs $ testdata , " CRS " , " EPSG-32613.prj" ),
351351 res = 10 , vals = 1 ,
352352 ext = c(xmin = 456000 , xmax = 461000 , ymin = 6105000 , ymax = 6110000 ))
353353
0 commit comments