X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 Jul 2016 03:59 PM by  anon
Issues with RESIZE_DOIT
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:3
New Member


--
15 Jul 2016 03:59 PM
    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

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    18 Jul 2016 08:06 AM
    When using RESIZE_DOIT, I believe the rfact you need to use would be 10. It is the opposite in the Resize Data tool. ENVI will default to polynomial in this case because aggregate is not available when sizing to a smaller pixel size. The description from the help: RFACT Use this keyword to specify a two-element array holding the rebin factors for x and y. The values of RFACT reflect the IDL convention for resizing data. A value of 1 does not change the size of the data. Values less than 1 cause the size to increase; values greater than 1 cause the size to decrease.
    You are not authorized to post a reply.