[R-sig-Geo] rast() in terra doesn't show cell values

2023-03-08 Thread Noah Charney
Hi, Can someone tell me what I'm missing? I can't get the rast() function in terra to return the actual cell values from an .img file, it just keeps giving strange histogram values. The plot() looks ok, except the legend has those same useless values. Similarly on the categorical NLCD Land Cover

Re: [R-sig-Geo] rast() in terra doesn't show cell values

2023-03-08 Thread Sarah Goslee
Hi Noah, It appears to be the same problem as this: [reading rasters in r using terra package](https://gis.stackexchange.com/questions/398061/reading-rasters-in-r-using-terra-package). As in that question, adding 0 forces the conversion, but loses all the information about color table, etc. cano

Re: [R-sig-Geo] rast() in terra doesn't show cell values

2023-03-08 Thread Noah Charney
Thanks! That fixed it! -Noah On Wed, Mar 8, 2023 at 5:40 PM Sarah Goslee wrote: > Hi Noah, > > It appears to be the same problem as this: [reading rasters in r using > terra package]( > https://gis.stackexchange.com/questions/398061/reading-rasters-in-r-using-terra-package > ). > As in that que