Hi, I'm using readGDAL to read data from a geoTiff file. The valid data range of the single band is -26 to 0. I have two versions of the file, one with a NoDataValue = -9999 and one with NoDataValue = -128. When reading the version with -9999 everything works great, and I get the data values in band1 mapped correctly on the original interval. But when I use the version of the file with NoDataValue = -128, these band1 data values get re-mapped to 0-255. I remember reading a helpfile or R-sig post on why the NoDataValue has such an effect, or what can be done to get around it. But can't for the life of me find that message anymore. The reason I need to use the file with NoDataValue = -128 is that this is in UTM 35 while the other one is in UTM 33. Since it's a SpatialGridDataFrames, I'd rather not use spTransform on it, since this turns it into a SpatialPointsDataFrame. The files were originally created (by someone else) in ArcGIS, so I could always ask them to re-create them with correct NoDataValue. But maybe there's a way to explicitly tell readGDAL how to treat the data values? I've desperately been looking for any help on this, but must be looking in the wrong place.... Thanks in advance, Martin
________________________________________________________________ Martin Biuw (PhD) Researcher Norwegian Institute for Nature Research - NINA Postal address: Framsenteret, 9296 Tromsø, NORWAY Delivery/Visiting address: Framsenteret, Hjalmar Johansens gate 14, 9007 Tromsø, NORWAY Phone: +47 77 75 04 17 * Cell: +47 40 72 96 15 * Fax: +47 77 75 04 01 * www.nina.no<http://www.nina.no/> ________________________________________________________________ [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo