What is the crs
of this object?
library(raster)
#> Loading required package: sp
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, will retire in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
#> The sp package is now running under evolution status 2
#> (status 2 uses the sf package in place of rgdal)
chm_p2r = raster("/home/roc/projects/demo/rasterize_canopy.vrt")
# it's a RasterLayer class S4 object
str(chm_p2r)
#> Formal class 'RasterLayer' [package "raster"] with 13 slots
#> ..@ file :Formal class '.RasterFile' [package "raster"] with 13 slots
#> .. .. ..@ name : chr "/home/roc/projects/demo/rasterize_canopy.vrt"
#> .. .. ..@ datanotation: chr "FLT4S"
#> .. .. ..@ byteorder : chr "little"
#> .. .. ..@ nodatavalue : num -Inf
#> .. .. ..@ NAchanged : logi FALSE
#> .. .. ..@ nbands : int 1
#> .. .. ..@ bandorder : chr "BIL"
#> .. .. ..@ offset : int 0
#> .. .. ..@ toptobottom : logi TRUE
#> .. .. ..@ blockrows : Named int 128
#> .. .. .. ..- attr(*, "names")= chr "rows"
#> .. .. ..@ blockcols : Named int 128
#> .. .. .. ..- attr(*, "names")= chr "cols"
#> .. .. ..@ driver : chr "gdal"
#> .. .. ..@ open : logi FALSE
#> ..@ data :Formal class '.SingleLayerData' [package "raster"] with 13 slots
#> .. .. ..@ values : logi(0)
#> .. .. ..@ offset : num 0
#> .. .. ..@ gain : num 1
#> .. .. ..@ inmemory : logi FALSE
#> .. .. ..@ fromdisk : logi TRUE
#> .. .. ..@ isfactor : logi FALSE
#> .. .. ..@ attributes: list()
#> .. .. ..@ haveminmax: logi TRUE
#> .. .. ..@ min : num -1.81
#> .. .. ..@ max : num 39.8
#> .. .. ..@ band : int 1
#> .. .. ..@ unit : chr ""
#> .. .. ..@ names : chr "rasterize_canopy"
#> ..@ legend :Formal class '.RasterLegend' [package "raster"] with 5 slots
#> .. .. ..@ type : chr(0)
#> .. .. ..@ values : logi(0)
#> .. .. ..@ color : logi(0)
#> .. .. ..@ names : logi(0)
#> .. .. ..@ colortable: logi(0)
#> ..@ title : chr(0)
#> ..@ extent :Formal class 'Extent' [package "raster"] with 4 slots
#> .. .. ..@ xmin: num 346458
#> .. .. ..@ xmax: num 372613
#> .. .. ..@ ymin: num 354461
#> .. .. ..@ ymax: num 373968
#> ..@ rotated : logi FALSE
#> ..@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
#> .. .. ..@ geotrans: num(0)
#> .. .. ..@ transfun:function ()
#> ..@ ncols : int 26155
#> ..@ nrows : int 19507
#> ..@ crs :Formal class 'CRS' [package "sp"] with 1 slot
#> .. .. ..@ projargs: chr "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
#> .. .. ..$ comment: chr "BOUNDCRS[\n SOURCECRS[\n PROJCRS[\"unknown\",\n BASEGEOGCRS[\"unknown\",\n "| __truncated__
#> ..@ srs : chr "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
#> ..@ history : list()
#> ..@ z : list()
# it has crs of
chm_p2r@crs@projargs
#> [1] "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
Created on 2023-06-28 with reprex v2.0.2