I have a 30m resolution raster with 4 bands and would like it to be 300m resolution raster.
In the ENVI gui (version 5.3.1) I used resize data specifying the pixel aggregate interpolation method and it worked correctly in less than 5 seconds. When I tried to execute the same process in IDL (version 8.5.1) using RESIZE_DOIT, it was very slow and did not use the correct interpolation. Instead of using the pixel aggregate interpolation method (3), the resize data processing window in IDL said that the method was 1st degree Polynomial w/ nearest neighbor. I am unclear about why this is happening. I tried changing the interpolation method and in IDL it seems to range from 0-8 (none with pixel aggregate) whereas in the gui there are only 4 interp options. Below is the code I am using which is based on (
http://www.harrisgeospati...s/resize_doit.html). Any insights would be greatly appreciated!
pro example_resize_doit
;
; First restore all the base save files.
;
envi, /restore_base_save_files
;
; Initialize ENVI and send all errors
; and warnings to the file batch.txt
;
envi_batch_init, log_file='batch.txt'
;
; Open the input file
;
envi_open_file, 'mc13v03CONUSanSUM.env', r_fid=fid
if (fid eq -1) then begin
envi_batch_exit
return
endif
;
; Set the POS keyword to process all
; spectral data. Output the result
; to disk.
;
envi_file_query, fid, dims=dims, nb=nb
pos = lindgen(nb)
out_name = 'testimg'
;
; Perform the resize calculation.
; Make the output image twice as
; large in both X and Y. Use
; bilinear interpolation.
;
envi_doit, 'resize_doit', $
fid=fid, pos=pos, dims=dims, $
interp=3, rfact=[.1,.1], $
out_name=out_name, r_fid=r_fid
;
; Exit ENVI
;
envi_batch_exit
end