当地理标记变成R中的砖块时,alpha波段会去哪里?如何获得假彩色合成?

时间:2017-05-02 21:23:59

标签: r r-raster

我正试图用开源软件隔离不透水的表面。到目前为止,所有带有遥感工具的东西都被误导到我无法绕过的地步。 但我相信R!我有一个.tif和gdal它显示了所有四个波段,R,G,B和alpha。但是当我把它带到R中时,任何东西,砖块,叠层或光栅......我都看不到alpha带......它只显示R,G,B而且我想得到一个假色复合物,这是没有锻炼。我认为这是因为缺少alpha乐队。有没有办法调整R中的波长? 在此先感谢您的帮助!

The tiff in gdal:

C:\>gdalinfo tgeotiff.tif

Size is 6964, 9787
Coordinate System is:
Metadata:
Image Structure Metadata:

Band 1 Block=6964x1 Type=Byte, ColorInterp=Red
  Description = Band #1
  Min=8.000 Max=247.000
  Minimum=8.000, Maximum=247.000, Mean=84.884, StdDev=54.598
  Overviews: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Metadata:
    DESCRIPTION=Band #1

Band 2 Block=6964x1 Type=Byte, ColorInterp=Green
  Description = Band #2
  Min=13.000 Max=246.000
  Minimum=13.000, Maximum=246.000, Mean=103.650, StdDev=53.246
  Overviews: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Metadata:
    DESCRIPTION=Band #2

Band 3 Block=6964x1 Type=Byte, ColorInterp=Blue
  Description = Band #3
  Min=22.000 Max=241.000
  Minimum=22.000, Maximum=241.000, Mean=85.311, StdDev=36.438
  Overviews: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Metadata:
    DESCRIPTION=Band #3

Band 4 Block=6964x1 Type=Byte, ColorInterp=Alpha
  Description = Band #4
  Min=0.000 Max=244.000
  Minimum=0.000, Maximum=244.000, Mean=130.583, StdDev=67.373
  Overviews: 3482x4894, 1741x2447, 871x1224, 436x612, 218x306
  Metadata:

The tiff in R:

r <- brick('tGeotiff')

r

class       : RasterBrick 
dimensions  : 195567, 73747, 14422479549, 3  (nrow, ncol, ncell, nlayers)
resolution  : 0.3, 0.3  (x, y)
extent      : 7268775, 7290899, 340179.9, 398850  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=ft +no_defs 
data source : C:\Users\tGeotiff 
names       : **tGeotiff.1, tGeotiff.2, tGeotiff.3** 
min values  :                  0,                  0,                  0 
max values  :                255,                255,                255 

0 个答案:

没有答案