How to identify the different discrete classes from a raster of land cover data (tif).
Hi, I'm not familiar with the dataset, but I am guessing it is related to how the labels are encoded. If that is the case, then it is possible the stored class labels are not literally 1-23 but are 23 labels selected from the range of 0-255. You could do a brief check with ... table(r[]) Cheers, Ben
On Tue, Mar 2, 2021 at 12:15 PM Manuel Sp?nola <mspinola10 at gmail.com> wrote:
Dear list members, I am working with a .tif file from the Copernicus Global Land Service with land cover data. The file has 23 discrete classes but the raster shows a continuous range of values (0 to 255). r = raster(W100N20_PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif) class : RasterLayer dimensions : 20160, 20160, 406425600 (nrow, ncol, ncell) resolution : 0.0009920635, 0.0009920635 (x, y) extent : -100, -80, 0, 20 (xmin, xmax, ymin, ymax) crs : +proj=longlat +datum=WGS84 +no_defs source : /Users/manuelspinola/Documents/01-Manolo/R_OVS_material/landscape_ecology/datos_copernicus/W100N20_PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif names : W100N20_PROBAV_LC100_global_v3.0.1_2019.nrt_Discrete.Classification.map_EPSG.4326 values : 0, 255 (min, max) How can I recognize the different discrete classes included in the raster representing each land cover type. Manuel -- *Manuel Sp?nola, Ph.D.* Instituto Internacional en Conservaci?n y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia COSTA RICA mspinola at una.cr <mspinola at una.ac.cr> mspinola10 at gmail.com Tel?fono: (506) 8706 - 4662 Personal website: Lobito de r?o < https://sites.google.com/site/lobitoderio/> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/> [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Ben Tupper Bigelow Laboratory for Ocean Science East Boothbay, Maine http://www.bigelow.org/ https://eco.bigelow.org [[alternative HTML version deleted]]