简体   繁体   English

IDL比较了Meteosat的1000 tif,并创建了一个新的

[英]IDL compare 1000 tifs from Meteosat and create a new one

I need to compare the bands 2,3,6 and 9 of the Meteosat-8 all 15min. 我需要比较Meteosat-8的15、2、3、6和9波段。 I already did the calculation for the brightness temperature and I managed to read all Tifs into IDL. 我已经进行了亮度温度的计算,并且设法将所有Tif读入IDL。

Now i did some Ratios. 现在我做了一些比率。 Like B6-B4, B9-3... Now I want to create a new Tif, where it writes (and later add up) a 1 or a 0 in it when some conditions are reached. 像B6-B4,B9-3 ...现在,我想创建一个新的Tif,当达到某些条件时,它会在其中写入(或以后加起来)1或0。

The result should be a Tif, where I have the amount of the "1" in every pixel. 结果应该是一个Tif,在每个像素中我都等于“ 1”。 I think I have to create a new array with the cols/rows and write after every "for loop" the 1 and 0 in it and add it up every time. 我想我必须创建一个带有cols / rows的新数组,并在每个“ for循环”之后写入其中的1和0,然后每次加起来。

Thanks! 谢谢! bumi 布米

I managed it to read tiffs and compare them in a new tif. 我设法读取tiff,并在新的tif中进行比较。 I did a for loop to load all paths in. 我做了一个for循环来加载所有路径。

The program works until there is a missing file (path doesn't exist). 该程序将一直运行,直到缺少文件(路径不存在)为止。 So I want to skip (continue) all the missing "paths". 所以我想跳过(继续)所有缺少的“路径”。

I think, I can do it with file_info or file_test. 我想,我可以使用file_info或file_test做到这一点。

x=file_info(filepath(path), exists) if x eq 0 then continue x = file_info(filepath(path),存在)如果x eq 0然后继续

exists: True(1) if the file exists. 存在:如果文件存在,则为True(1)。 False (0) if it does not exists. 如果不存在,则为假(0)。

thanks 谢谢

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

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