comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » resample
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
resample [message #71519] Tue, 29 June 2010 22:09 Go to next message
gaurijyoti29 is currently offline  gaurijyoti29
Messages: 10
Registered: April 2009
Junior Member
Dear Max,

I have done this way

envi_open_file, file1, r_fid=_rfid1
envi_file_query, _rfid1, ns=_ns1, nl=_nl1, nb=_nb1, dims=_dims1,
data_type=_datatype1, interleave=_interleave1, xstart=_xstart1,
ystart=_ystart1
_mapinfo1 = envi_get_map_info(fid=_rfid1)

envi_open_file, file2, r_fid=_rfid2
envi_file_query, _rfid2, ns=_ns2, nl=_nl2, dims=_dims2
_mapinfo2 = envi_get_map_info(fid=_rfid2)

_xfactor = _mapinfo2.ps[0] / _mapinfo1.ps[0]
_yfactor = _mapinfo2.ps[1] / _mapinfo1.ps[1]

envi_doit, 'resize_doit', fid=_rfid1, pos=pos1, dims=_dims1, interp=0,
rfact=[_xfactor,_yfactor], r_fid=_rfid2a, out_name=tempfile

But the resampled file does not give the same number of pixels and
lines corresponding to high resolution image(file2). Kindly suggest me
to fix this problem.

Thanks for your help.
Re: resample [message #71530 is a reply to message #71519] Tue, 29 June 2010 02:23 Go to previous messageGo to next message
Maxwell Peck is currently offline  Maxwell Peck
Messages: 61
Registered: February 2010
Member
On Jun 29, 7:20 pm, Maxwell Peck <maxjp...@gmail.com> wrote:
> On Jun 29, 7:02 pm, dolly <gaurijyot...@gmail.com> wrote:
>
>> I want to use Landsat-5 TM data for getting information like pixel
>> size,number of pixels and number of lines to resample AWiFS data using
>> envi+idl program automatically.
>
>>  Any help would be much appreciated.
>
> Search the help for the following ENVI IDL functions. It should give
> you all you need.
> ENVI_OPEN_FILE
> ENVI FILE QUERY
> ENVI_GET_MAP_INFO
> RESIZE_DOIT
>
> Max

That should be ENVI_FILE_QUERY
Re: resample [message #71531 is a reply to message #71519] Tue, 29 June 2010 02:20 Go to previous messageGo to next message
Maxwell Peck is currently offline  Maxwell Peck
Messages: 61
Registered: February 2010
Member
On Jun 29, 7:02 pm, dolly <gaurijyot...@gmail.com> wrote:
> I want to use Landsat-5 TM data for getting information like pixel
> size,number of pixels and number of lines to resample AWiFS data using
> envi+idl program automatically.
>
>  Any help would be much appreciated.

Search the help for the following ENVI IDL functions. It should give
you all you need.
ENVI_OPEN_FILE
ENVI FILE QUERY
ENVI_GET_MAP_INFO
RESIZE_DOIT

Max
Re: resample [message #71614 is a reply to message #71519] Wed, 30 June 2010 00:15 Go to previous message
Maxwell Peck is currently offline  Maxwell Peck
Messages: 61
Registered: February 2010
Member
On Jun 30, 3:09 pm, dolly <gaurijyot...@gmail.com> wrote:
> Dear Max,
>
> I have done this way
>
> envi_open_file, file1, r_fid=_rfid1
> envi_file_query, _rfid1, ns=_ns1, nl=_nl1, nb=_nb1, dims=_dims1,
> data_type=_datatype1, interleave=_interleave1, xstart=_xstart1,
> ystart=_ystart1
> _mapinfo1 = envi_get_map_info(fid=_rfid1)
>
> envi_open_file, file2, r_fid=_rfid2
> envi_file_query, _rfid2, ns=_ns2, nl=_nl2, dims=_dims2
> _mapinfo2 = envi_get_map_info(fid=_rfid2)
>
> _xfactor = _mapinfo2.ps[0] / _mapinfo1.ps[0]
> _yfactor = _mapinfo2.ps[1] / _mapinfo1.ps[1]
>
> envi_doit, 'resize_doit', fid=_rfid1, pos=pos1, dims=_dims1, interp=0,
> rfact=[_xfactor,_yfactor], r_fid=_rfid2a, out_name=tempfile
>
> But the resampled file does not give the same number of pixels and
> lines corresponding to high resolution image(file2). Kindly suggest me
> to fix this problem.
>
> Thanks for your help.

Now that I think I understand what you want using
ENVI_LAYER_STACKING_DOIT instead is probably a better option for you.
There is a good example in the help.

Max
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Availables : More that 3500 Solutions manuals and Test Banks (Part 3)
Next Topic: problem is ther in my progam how to solve this problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:14:59 PDT 2025

Total time taken to generate the page: 0.00555 seconds