-
Notifications
You must be signed in to change notification settings - Fork 47
NA-Bug? #93
Comments
Thanks @raff-k, will have a look at it the next days. If it the solution is as simple as specifying Then you can issue a PR. In any case thanks for your valuable input! |
The NA issue is solved on my fork when I added try(writeRaster(
params[[i]], filename = fname, format = "GTiff",
prj = TRUE, overwrite = TRUE, NAflag = NAflag
), silent = TRUE)
)
if (inherits(test, "try-error")) {
while (tolower(basename(fname)) %in% tolower(dir(tempdir()))) {
fname <- paste0(gsub(".tif", "", fname), 1, ".tif")
}
writeRaster(
params[[i]], filename = fname, format = "GTiff",
prj = TRUE, overwrite = TRUE, NAflag = NAflag
) Maybe you could think about to add NAflag as "flag"-parameter to |
Commit 9e74a4a should address your issue, pls check and if solved, close the issue. |
thank you for implementation, @jannes-m. Issue is solved :-) |
Dear RQGIS team,
since the QGIS processing toolbox is working on my machine, I could further invesitage the issue with NA-values. I discovered, that it seems to be a more general RQGIS (to QGIS) issue. I tested different ways of writing out a raster containing NA values and then computed
slope
manually in QGIS (I tried SAGA and GRASS GIS version). I discovered that generally tiff-files written out usingrgdal::writeGDAL(…)
worked in QGIS. Tiffs written withraster::writeRaster(…)
only worked in QGIS if I have set a NA-flag. Perhaps QGIS cannot deal with or pass a correct no data value to SAGA or GRASS when its no data value is-3.39e^38
?Can you repdoruce the issue? – If yes, maybe an alternative can be to set a default NA-value (i.e. -99999) or switching the write function to rgdal.
I used QGIS 2.18.15, and RQGIS_1.0.2.
The text was updated successfully, but these errors were encountered: