Tech Programing


HDFql C# wraper created attribute cannot be shown in hdfview correctly

1 min read

I am trying to create a hdf5 file with HDFql C# wraper. But the attribute create cannot be shown correctly with hdfview. enter image description here

The following is the code I modified from the example. I created two attributes, one is picasso/guernica/subject = guerra civil española and the other is picasso/guernica/subject2 = 你好. But the first one cannot be shown correctly, and the second attribute is not created.

class Program
    static void Main(string[] args)
        int[,] values = new int[200, 150];
        int x;
        int y;
        HDFql.Execute("CREATE TRUNCATE FILE painters.h5");
        HDFql.Execute("USE FILE painters.h5");
        HDFql.Execute("CREATE GROUP picasso ORDER TRACKED");
        HDFql.Execute("CREATE CHUNKED(40, 30) DATASET picasso/guernica AS INT(200, 150) ENABLE FLETCHER32");
        for (x = 0; x < 200; x++)
            for (y = 0; y < 150; y++)
                values[x, y] = x * 150 + y;
        HDFql.Execute("INSERT INTO picasso/guernica VALUES FROM MEMORY " +HDFql.VariableTransientRegister(values));
        HDFql.Execute("CREATE ATTRIBUTE picasso/guernica/subject AS UTF8 VARCHAR VALUES("guerra civil española")");
        HDFql.Execute("CREATE ATTRIBUTE picasso/guernica/subject2 AS UTF8 VARCHAR VALUES("你好")");
        HDFql.Execute("CLOSE FILE");

Source link



發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *