|||
rem Set the MRT_HOME environmental var to the MRT installation directory.
set MRT_HOME=D:Modis
rem Set the MRTDATADIR environmental var to the MRT data directory.
set MRTDATADIR=D:Modisdata
rem Set the PATH environment variable to include the MRT executables.
set Path=%MRT_HOME%bin;%Path%
dir d:2008_lst_nationmod11a2.a2008*.hdf /s/b > 2008_lst_nation.txt
for /f "tokens=4,5,7 delims=:." %%i in (2008_lst_nation.txt) do @echo d:2008_lst_nationmod11A2.%%i.%%j.005.%%k.hdf >> %%i.txt
dir a2008*.txt /s/b > tmp.txt
for /f "tokens=3 delims=:." %%i in (tmp.txt) do @echo %%i >> list.txt
for /f %%i in (list.txt) do prm.bat %%i
%MRT_HOME%binmrtmosaic -i %1.txt -o %1.hdf -s "1 1 1 1 1 1 1 1 1 1 1 1 "
@echo INPUT_FILENAME = D:2008_lst_nation_tif%1.hdf >> %1.prm
@echo SPECTRAL_SUBSET = ( 1 1 1 1 1 1 1 1 1 1 1 1 ) >> %1.prm
@echo SPATIAL_SUBSET_TYPE = INPUT_LAT_LONG >> %1.prm
@echo SPATIAL_SUBSET_UL_CORNER = ( 40.0 117.48665604 ) >> %1.prm
@echo SPATIAL_SUBSET_LR_CORNER = ( 20.0 117.059554972 ) >> %1.prm
@echo OUTPUT_FILENAME = D:2008_lst_nationa2008001.tif >> %1.prm
@echo RESAMPLING_TYPE = NEAREST_NEIGHBOR >> %1.prm
@echo OUTPUT_PROJECTION_TYPE = UTM >> %1.prm
@echo OUTPUT_PROJECTION_PARAMETERS = ( >> %1.prm
@echo 0.0 0.0 0.0 >> %1.prm
@echo 0.0 0.0 0.0 >> %1.prm
@echo 0.0 0.0 0.0 >> %1.prm
@echo 0.0 0.0 0.0 >> %1.prm
@echo 0.0 0.0 0.0 ) >> %1.prm
@echo DATUM = WGS84 >> %1.prm
@echo UTM_ZONE = 50 >> %1.prm
%MRT_HOME%binresample -p %1.prm -o %1.tif
del /f %1.txt %1.prm
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-27 11:58
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社