gdl
gdl copied to clipboard
missing atributes for variables in GDL
since idl 8.4, we can access to the attributes of variables https://www.l3harrisgeospatial.com/docs/variable_attributes.html
IDL> help, var
VAR INT = Array[72, 416, 9, 2225]
IDL> PRINT, var.length
599788800
IDL> PRINT, var.typename
INT
IDL> PRINT, var.typecode
2
IDL> PRINT, var.ndim
4
IDL> PRINT, var.dim
72 416 9 2225
I don't know if it would be difficult to have that in GDL but I received today a code using that to solve the concatenation issue in IDL !! (you cannot concatenate 4D cubes in IDL but you can in GDL :smile:) (as mention in the last lines of http://www.idlcoyote.com/tips/array_concatenation.html )
IDL> help, c1, c2
C1 INT = Array[72, 416, 9, 2225]
C2 INT = Array[72, 416, 9, 2225]
IDL> c=[[[[c1]]],[[[c2]]]]
c=[[[[c1]]],[[[c2]]]]
^
% Only three levels of variable concatenation are allowed.
but
GDL> c=[[[[c1]]],[[[c2]]]]
GDL> help, c, c1, c2
C INT = Array[72, 416, 9, 4450]
C1 INT = Array[72, 416, 9, 2225]
C2 INT = Array[72, 416, 9, 2225]
Does not look to diificult, as 'var' is an object, so adding properties is part of the game?