We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compression
writeRaster
Hello, I would like to export a raster object into netCDF file. However, I receive an error when using compression argument.
# raster version: 3.6-26 # ncdf4 version: 1.22 require(raster); require(ncdf4) Map <- raster::raster( nrows = 404, ncols = 390, xmn = 2630000, xmx = 6530000, ymn = 1380000, ymx = 5420000, crs = "epsg:3035", vals = 1:157560) raster::writeRaster(Map, filename = "Map1.nc", format = "CDF") file.size("Map1.nc") # 637396
raster::writeRaster(Map, filename = "Map2.nc", format = "CDF", compression = 5)
A smaller file was created, but with the following error:
# Error in R_nc4_open: NetCDF: Unknown file format # Error in ncdf4::nc_open(filename, readunlim = FALSE, suppress_dimvals = TRUE) : # Error in nc_open trying to open file D:\BioDT_IAS\Map2.nc (return_on_error= FALSE ) file.size("Map2.nc") # 201879
Setting options(HDF5_USE_FILE_LOCKING=FALSE), as suggested here, did not help.
options(HDF5_USE_FILE_LOCKING=FALSE)
I tried using terra:: but found an issue with the CRS information.
terra::
Any suggestions on how to avoid this issue?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I would like to export a raster object into netCDF file. However, I receive an error when using
compression
argument.A smaller file was created, but with the following error:
Setting
options(HDF5_USE_FILE_LOCKING=FALSE)
, as suggested here, did not help.I tried using
terra::
but found an issue with the CRS information.Any suggestions on how to avoid this issue?
The text was updated successfully, but these errors were encountered: