简体   繁体   English

ENVI二进制文件转换为TIFF

[英]Conversion of ENVI binary files to tiff

I have a challenge in converting a batch of ENVI binary files(BSQ) temperature data(gotten from SAFARI 2000 AVHRR-Derived LST) to geotiff files. 在将一批ENVI二进制文件(BSQ)温度数据(从SAFARI 2000 AVHRR衍生的LST获得)转换为geotiff文件时,我遇到了挑战。 How can i read them and convert it to geotiff? 我如何阅读它们并将其转换为geotiff?
An example of one such file is 'afn_011-011_96.n14-LST_UL' 此类文件的一个示例是“ afn_011-011_96.n14-LST_UL”

You would need to provide a proper sample dataset and the corresponding meta-data that tells you the image dimensions in pixels, the data type and so on, but in principle you can do it with ImageMagick which is included in most Linux distros and is available for macOS and Windows. 您需要提供适当的样本数据集和相应的元数据,以告诉您图像尺寸(以像素为单位),数据类型等,但是原则上您可以使用大多数Linux发行版中随附的ImageMagick来实现。适用于macOS和Windows。

So, using the dataset here sample dataset and knowing the data is unsigned 8 bit and 360x180 pixels, you would run this command in Terminal (or Command Prompt if on Windows): 因此,在此处使用示例数据集的数据并知道数据是无符号的8位和360x180像素,您可以在终端中运行此命令(如果在Windows上则运行命令提示符):

convert -size 360x180 -depth 8 gray:gl-latlong-1deg-landcover.bsq -auto-level result.tif

If your data is multi-band band-sequential, you may have to use: 如果您的数据是多频带频带序列的,则可能必须使用:

convert -size 360x180 -depth 8 -interlace plane rgb:gl-latlong-1deg-landcover.bsq -auto-level result.tif

Or, if you cannot get that to work, you may need to extract each band separately using a byte offset and then combine them afterwards, something like: 或者,如果您无法正常工作,则可能需要使用字节偏移量分别提取每个频段,然后再将它们合并,例如:

convert -size 360x180        -depth 8 gray:image.bsq -auto-level red.tif
convert -size 360x180+64800  -depth 8 gray:image.bsq -auto-level green.tif
convert -size 360x180+129600 -depth 8 gray:image.bsq -auto-level blue.tif
convert red.tif green.tif blue.tif -combine RGB.tif

Note that if you install ImageMagick v7 or newer, the above commands change to: 请注意,如果您安装ImageMagick v7或更高版本,则以上命令将更改为:

magick -size ...

rather than: 而不是:

convert -size ...

Keywords : ImageMagick, command-line, command line, image, image processing, satellite, ENVI, band-sequential, planar, imagery, AVHRR, convert 关键字 :ImageMagick,命令行,命令行,图像,图像处理,卫星,ENVI,频带序列,平面,图像,AVHRR,转换

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM