如何访问R中的栅格全局属性?

时间:2018-05-16 14:58:19

标签: r raster

如何简单地访问栅格" 全局属性" (例如,标题或传感器 - 参见下面的数据结构)?

是否有可能将这些信息与我获得的范围和日期信息相同(见下文)?

multiprocessing.Pool

Bellows是我的光栅列表的结构:

Dim answer As String
If Words.contains(answer) Then
        MessageBox.Show("you got it")
        End If

1 个答案:

答案 0 :(得分:0)

使用ncdf4包读取.nc文件并浏览

# open nc connection
my.nc <- nc_open("./path/thedata.nc")

# names of variables
names(my.nc$var)

# names of attributes of a variable
ncatt_get(my.nc,attributes(my.nc$var)$names[1])

# check the names of dimensions
length(my.nc$dim)
names(my.nc$dim)

# check time dimension of file
my.nc$dim$time
my.nc$dim$time$vals

# global attributes
ncatt_get(my.nc, 0)

# attributes of specific variable
ncatt_get(my.nc, "some_variable")

和其他人以及更多。

相关问题