build_raster_header: Builds a raster header for a flat binary file.

Description Usage Arguments Author(s) See Also Examples

View source: R/build_raster_header.R

Description

Builds a raster header for a flat binary file.

Usage

1
2
3
build_raster_header(x_filename, reference_raster, out_nlayers,
  datatype = "FLT8S", format = "raster", bandorder = "BSQ",
  setMinMax = FALSE, additional_header = NULL, verbose = FALSE)

Arguments

x_filename

Character. The filename of the input binary file.

reference_raster

Raster*. A Raster* object containing the header information to be used.

out_nlayers

Numeric. The number of layers in the flat binary file (defaults to nlayers(reference_raster)).

datatype

Character. The dataType of the flat binary file. See ?dataType for available datatypes. Default is 'FLT8S'.

bandorder

Character. The bandorder ('BIP','BIL','BSQ') of the file. Default is 'BSQ'.

format

Character. The format of the header. See ?hdr for valid entries. Default is 'raster'. CURRENTLY UNSUPPORTED.

setMinMax

Logical. Set the min/max for the file (will take longer to execute)? Default=FALSE.

additional_header

Character. Create additional output headers for use with other GIS systems (see hdr). Set to NULL (default) to suppress.

verbose

logical. Enable verbose execution? Default is FALSE.

Author(s)

Jonathan A. Greenberg and Robert Hijimans ([email protected])

See Also

hdr,dataType

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
tahoe_highrez <- brick(system.file("external/tahoe_highrez.tif", package="spatial.tools"))
test_blank_file <- create_blank_raster(filename=paste(tempfile(),".gri",sep=""),
	reference_raster=tahoe_highrez,nlayers=2,
	create_header=FALSE,format="raster",datatype="FLT8S",bandorder="BSQ")
test_blank_raster <- build_raster_header(x_filename=test_blank_file,
	reference_raster=tahoe_highrez,out_nlayers=2,
	datatype='FLT8S',format='raster',bandorder="BSQ",setMinMax=TRUE)
test_blank_raster

## End(Not run)

azvoleff/spatial.tools documentation built on June 4, 2017, 12:08 a.m.