Re: ENVI_INIT_TILE tiling problem [message #65628] |
Sat, 14 March 2009 11:11  |
jeffnettles4870
Messages: 111 Registered: October 2006
|
Senior Member |
|
|
On Mar 14, 9:10 am, a.l.j.f...@gmail.com wrote:
> I'm using interpolation to fill some holes in elevation data. Because
> of memory limitations I'm trying Envi's tiling capability for the
> first time! My code compiles OK, but when I run it (I have it embedded
> in an Envi User Function) I get this error in my IDL window:
>
> % Variable is undefined: F_NS.
> % Execution halted at: ENVI_INIT_TILE
>
> Here is the offending section of code. I have no idea where F_NS is
> (I'd understand if it was simply NS, i.e. number of samples) and
> despite searching I cannot deduce what is wrong or how to fix it. Does
> anyone have any ideas?? BTW, the elevation data has a single band and
> my_pos is set to [0].
>
> tile_id=ENVI_INIT_TILE(output_DSM, my_pos)
> FOR i=0, num_tiles-1 DO BEGIN
> tile_data_interp=ENVI_GET_TILE(tile_id, i)
>
> ;Processing within Tiling
>
> tile_data_interp = REPLICATE(0.0, dims[2], dims[4])
> tile_data_interp = TRI_SURF(output_DSM, /REGULAR, XGRID=[1, 1],
> YGRID=[1, 1], NX=dims[2], NY=dims[4])
>
> ; Close Tiling
>
> ENDFOR
> ENVI_TILE_DONE, tile_id
I would check to make sure that the first argument to ENVI_INIT_TILE
is supplied correctly. You should be giving it the FID of the input
file, but the "output_DSM" doesn't sound like an input FID to me. In
fact, since you use it as an argument to TRI_SURF it looks like
output_DSM has to be an actual data array. So i think you're giving
ENVI_INIT_TILE an incorrect argument.
|
|
|
Re: ENVI_INIT_TILE tiling problem [message #65714 is a reply to message #65628] |
Mon, 16 March 2009 01:26   |
a.l.j.ford
Messages: 7 Registered: March 2009
|
Junior Member |
|
|
On Mar 14, 6:11 pm, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On Mar 14, 9:10 am, a.l.j.f...@gmail.com wrote:
>
>
>
>> I'm using interpolation to fill some holes in elevation data. Because
>> of memory limitations I'm trying Envi's tiling capability for the
>> first time! My code compiles OK, but when I run it (I have it embedded
>> in an Envi User Function) I get this error in my IDL window:
>
>> % Variable is undefined: F_NS.
>> % Execution halted at: ENVI_INIT_TILE
>
>> Here is the offending section of code. I have no idea where F_NS is
>> (I'd understand if it was simply NS, i.e. number of samples) and
>> despite searching I cannot deduce what is wrong or how to fix it. Does
>> anyone have any ideas?? BTW, the elevation data has a single band and
>> my_pos is set to [0].
>
>> tile_id=ENVI_INIT_TILE(output_DSM, my_pos)
>> FOR i=0, num_tiles-1 DO BEGIN
>> tile_data_interp=ENVI_GET_TILE(tile_id, i)
>
>> ;Processing within Tiling
>
>> tile_data_interp = REPLICATE(0.0, dims[2], dims[4])
>> tile_data_interp = TRI_SURF(output_DSM, /REGULAR, XGRID=[1, 1],
>> YGRID=[1, 1], NX=dims[2], NY=dims[4])
>
>> ; Close Tiling
>
>> ENDFOR
>> ENVI_TILE_DONE, tile_id
>
> I would check to make sure that the first argument to ENVI_INIT_TILE
> is supplied correctly. You should be giving it the FID of the input
> file, but the "output_DSM" doesn't sound like an input FID to me. In
> fact, since you use it as an argument to TRI_SURF it looks like
> output_DSM has to be an actual data array. So i think you're giving
> ENVI_INIT_TILE an incorrect argument.
Yes, you were right, output_DSM was an array rather than a FID. Many
thanks! I changed it to a valid FID and also modified "num tiles". I
now have:
tile_id=ENVI_INIT_TILE(fid_output_DSM, my_pos,
num_tiles=number_of_tiles)
FOR i=0, number_of_tiles-1 DO BEGIN
tile_data_interp=ENVI_GET_TILE(tile_id, i)
;Processing within Tiling
tile_data_interp = REPLICATE(0.0, dims[2], dims[4])
tile_data_interp = TRI_SURF(output_DSM, /REGULAR, XGRID=[1, 1], YGRID=
[1, 1], NX=dims[2], NY=dims[4])
; Close Tiling
ENDFOR
ENVI_TILE_DONE, tile_id
But this now results in the following error, which I don't understand
and can't find a reference to (including in tri_surf.pro, unless I've
missed something?). Any ideas?
% Array dimensions must be greater than 0.
% Error occurred at: TRI_SURF 136 C:\Program Files\ITT
\IDL64\lib\tri_surf.pro
output_DSM is certainly a 2D array, as I'm able to TVSCL it to view
the contents.
output_DSM contains lots of holes (value of 0) which I'd like to
interpolate over using TRI_SURF.
|
|
|
Re: ENVI_INIT_TILE tiling problem [message #66070 is a reply to message #65628] |
Fri, 10 April 2009 03:07  |
nitinkgeo
Messages: 2 Registered: April 2009
|
Junior Member |
|
|
On Mar 14, 11:11 pm, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On Mar 14, 9:10 am, a.l.j.f...@gmail.com wrote:
>
>
>
>> I'm using interpolation to fill some holes in elevation data. Because
>> of memory limitations I'm trying Envi's tiling capability for the
>> first time! My code compiles OK, but when I run it (I have it embedded
>> in an Envi User Function) I get this error in my IDL window:
>
>> % Variable is undefined: F_NS.
>> % Execution halted at: ENVI_INIT_TILE
>
>> Here is the offending section of code. I have no idea where F_NS is
>> (I'd understand if it was simply NS, i.e. number of samples) and
>> despite searching I cannot deduce what is wrong or how to fix it. Does
>> anyone have any ideas?? BTW, the elevation data has a single band and
>> my_pos is set to [0].
>
>> tile_id=ENVI_INIT_TILE(output_DSM, my_pos)
>> FOR i=0, num_tiles-1 DO BEGIN
>> tile_data_interp=ENVI_GET_TILE(tile_id, i)
>
>> ;Processing within Tiling
>
>> tile_data_interp = REPLICATE(0.0, dims[2], dims[4])
>> tile_data_interp = TRI_SURF(output_DSM, /REGULAR, XGRID=[1, 1],
>> YGRID=[1, 1], NX=dims[2], NY=dims[4])
>
>> ; Close Tiling
>
>> ENDFOR
>> ENVI_TILE_DONE, tile_id
>
> I would check to make sure that the first argument to ENVI_INIT_TILE
> is supplied correctly. You should be giving it the FID of the input
> file, but the "output_DSM" doesn't sound like an input FID to me. In
> fact, since you use it as an argument to TRI_SURF it looks like
> output_DSM has to be an actual data array. So i think you're giving
> ENVI_INIT_TILE an incorrect argument.
Hi Jeff this is Nitin, I am a Research Scholar, and i am also facing
same kind of problem during creation of DEM from geoeye pan data(I am
using ENVI 4.6). When i run the process in lower level(5th level),
process runs smoothly and result come out. but when i run the process
in Maximum level(8th) at the end of the process a error appears as
"Array dimension is must be greater than 0"
will you suggest me, why this kind of error is occurring, is it due to
heavy data size.
|
|
|