Skip to content
Back to formatted view

Raw Message

Message-ID: <CAKq0nOx+AUc1cQsrBxE3nS1e62TArXDwwogfr=VPeVYiRcTy9w@mail.gmail.com>
Date: 2021-03-26T19:34:15Z
From: Yasna K Palmeiro Silva
Subject: question on writeRaster error
In-Reply-To: <CAAKwTDF960BhduO1abFDWZ3=7K7m27JfAv=mE=kPfsppGcDhtA@mail.gmail.com>

Hi Gabriel,

I guess, the syntax is different:

The general syntax is:
writeRaster(NameRaster, file="PathOfFolderSTinDesktop/NameFile.tif",
format= ""GTiff", overwrite=TRUE)

If you want to add options with bands:
writeRaster(NameRaster, file="FolderPath/NameFile.tif", format= ""GTiff",
overwrite=TRUE, options= c("INTERLEAVE=BAND","COMPRESS=LZW"))

NameRaster is a RasterLayer or RasterBrick t in your global environment.

Hope this works,

Best
Yasna







On Fri, 26 Mar 2021 at 18:57, Gabriel Cotlier <gabiklm01 at gmail.com> wrote:

> Hello,
>
> I'm trying to save a raster on workspace as GeoTIFF file into a folder
> named ST in Desktop
>
> writeRaster(x = ST ,  file = paste(n,"_Rescaled_band",sep=" "),
> format="GTiff",  overwrite = T)
>
> and got the following error message :
>
> Error in .local(x, filename, ...) :
>   Attempting to write a file to a path that does not exist:
>   ST
>
> Thanks for your help.
> Regards.
>
>         [[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
>


-- 
*?Yasna K Palmeiro Silva.*

?*Tildes han sido omitidos? intencionalmente

	[[alternative HTML version deleted]]