Creates and initializes a flow direction grid from the content of a binary file.
handle_fdr = CreateFlowDirFromBinary ( binfile , TYPE , DirCodes [, name] )
character string: path of the binary file to be read. The extension can be anything, but a header file with the same root and with the extension ".hdr" must be present in the same directory.
Character string : type of the data to be read and converted to single-precision
'c' : char
'uc' : unsigned char
's' : short int
'us' : unsigned short int
'i' : int
'ui' : unsigned int
'f' : float
'l' : long int
'ul' : unsigned long int
'd' : double
3 x 3 matrix containing the codification of the 8 possible flow directions. ESRI convention is [ 32 , 64 , 128 ; 16 , -9999 , 1 ; 8 , 4 , 2 ]
(optional) character string
integer: handle on the newly created flow direction grid.
Reads a flow direction grid from a binary file (e.g., ESRI Binary Grid .flt). Any numerical type is supported and will be converted to a 1-byte value.
Returns a handle on the new grid.
NB : Objects of type "flow direction grid" ("FlowDirGrid" structures) are distinct from those of type "single-precision floating-point raster" ("FloatRaster" structures). Rasters are stored using 4-bytes records, while flow direction grids only require 1 byte per pixel.