Learn R Programming

geoTS (version 0.1.8)

transfer_bin_raster: Transfer values from a binary image file to a raster file

Description

Get the values of a binary file (in integer format) and transfer them to a raster file. All formats considered in writeRaster are allowed.

Usage

transfer_bin_raster(
  inputPath,
  outputPath,
  master,
  what = integer(),
  signed = TRUE,
  endian = "little",
  size = 2,
  format = "GTiff",
  dataType = "INT2S",
  overwrite = TRUE
)

Value

At the designated path (outputPath) the user will find TIF file(s).

Arguments

inputPath

character with full path name of input file(s).

outputPath

character with full path name (where the raster files will be saved).

master

character with full path name of a raster file; extent and projection of this file are applied to this function output.

what

See readBin. Default integer().

signed

See readBin. Default TRUE.

endian

See readBin. Default "little".

size

integer, number of bytes per element in the byte stream, default 2. See readBin.

format

character, output file type. See writeFormats.

dataType

character, output data type. See dataType.

overwrite

logical, default TRUE, should the resulting raster be overwritten.

Examples

Run this code
# \donttest{
inputPath = system.file("extdata", package = "geoTS")
masterFile = system.file("extdata", "master.tif", package = "geoTS") 
transfer_bin_raster(inputPath = inputPath, outputPath = inputPath, 
                    master = masterFile, what = integer(),
                    signed = TRUE, endian = "little", size = 2,
                    format = "GTiff", dataType = "INT2S", overwrite = TRUE)
# }

Run the code above in your browser using DataLab