[R] writeRaster dataType changes
emma.white at sdstate.edu
Thu Sep 25 20:08:12 CEST 2014
I am reading in some raster files and converting them to GeoTiff (using
the raster package), I want them to be 8 bit unsigned integer (values in
the case of this particular raster range from 0 to 55). However when
writing the raster to GeoTiff R seems to assign it to dataType "FLT4S"
despite specifying the dataType. See example code below:
foo<- raster(raster.files,datatype = INT1U)
format="GTiff",dataType = 'INT1U',overwrite=TRUE)
Any help/ insight would be appreciated. Thanks!
Geospatial Science Center of Excellence
South Dakota State University
Email: Emma.White at sdstate.edu
More information about the R-help