- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
一个有 4 个波段的 RasterLayer:
>rx<-raster("/media/karimdion/Passport/Essais/po_3804017_bgrn_0000000 tif")
> str(rx)
Formal class 'RasterLayer' [package "raster"] with 12 slots
@ file :Formal class '.RasterFile' [package "raster"] with 12 slots
@ nbands : int 4
@ bandorder : chr "BIL"
@ data :Formal class '.SingleLayerData' [package "raster"] with 13 slots
@ min : num 0
@ max : num 65535
@ band : int 1
@ history : list()
@ title : chr(0)
@ extent :Formal class 'Extent' [package "raster"] with 4 slots
@ xmin: num 655781
@ xmax: num 666701
@ ymin: num 4071522
@ ymax: num 4084598
@ rotated : logi FALSE
@ rotation:Formal class '.Rotation' [package "raster"] with 2 slots
@ geotrans: num(0)
@ transfun:function ()
@ ncols : int 5460
@ nrows : int 6538
@ crs :Formal class 'CRS' [package "sp"] with 1 slots
@ projargs: chr "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
@ z : list()
我想将单个变量中的每个波段作为 RasterLayer。因此,我将得到 4 个具有 1 个波段的 RasterLayers。我怎样才能用 R 做到这一点?
最佳答案
使用文件名 f(这里使用示例文件进行重现)
f <- system.file("external/rlogo.grd", package="raster")
对于特定的乐队,你可以这样做
r <- raster(f, band=2)
或适用于所有乐队
b <- brick(f)
或者(效率较低):
s <- stack(f)
关于R - 获取 RasterLayer 的特定波段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15270107/
我需要从 4 波段图像中提取 3 波段。我正在使用一个名为 NumpyArrayToRaster() 的函数,它最多只接受 3 个波段图像。我如何让它适用于 4 波段图像? 这是我现在的代码- imp
我正在尝试制作一个安卓播放器,但在制作均衡器时出现了问题。均衡器频段是有限制的,例如 Nexus 5 默认有 5 频段均衡器。一些播放器(例如 Poweramp)以某种方式设法获得 10 频段均衡器,
我正在尝试读取 4 波段(红色、绿色、蓝色、近红外)geotiff ( example data ) 并执行 quickshift segmentation在 Python 中使用 scikit-im
如何使用 Rasterio 从多数据集 MODIS 图像中打开特定数据集? 我在 GitHub 上发布了一些示例数据:https://github.com/SteveObert/rasterIO_qu
我正在为 Microsoft Band 开发 UWP 应用程序,最近从 Band SDK ver 1.3.11121 升级到 Microsoft Band SDK ver 1.3.20115。 我注意
我是一名优秀的程序员,十分优秀!