Domanda

I don't really use IDL but am using a model written in IDL. I have some pre-established scripts that extract the output from .dat to .tif but now I would like to look at some intermediate files. Essentially the code is as follows:

openw, 1, file.dat
var_cube=assoc(1,fltarr(ncols,nrows))
for i=0,num_elements do begin
ivar=doi(i)
var_cube[i]=allvar_cube[ivar]
endfor

What is the format of file.dat? flat binary, little endian? I don't quite understand all the syntax in the model but var_cube would be a 3-d array where ncols,nrows is a spatial domain and the 3rd D are time slices. I would like to open these files in any other program, for example R to view the raster slices.

È stato utile?

Soluzione

Since there was no specific keywords on the OPEN for the endianness, such as SWAP_IF_BIG_ENDIAN or SWAP_IF_LITTLE_ENDIAN, the file will be created in the native endianness of the machine the code is run on.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top