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

Home » Public Forums » archive » Raster to Vector
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
Raster to Vector [message #43371] Thu, 07 April 2005 11:20 Go to next message
julio is currently offline  julio
Messages: 31
Registered: December 2003
Member
Hello there,

A have a TIF image and I want to make a raster to vector conversion of
some DN values.

I'm using rtf_doit:

values = [4096] ; the DN I want to convert
l_name = [values]
out_names = dir+'testimg_' + $
strcompress(string(values),/remove_all) + '.evf'
in_memory = lonarr(n_elements(values))

envi_toggle_catch
envi_doit, 'rtv_doit', $
fid=fid, pos=pos, dims=dims, $
values=values, l_name=l_name, $
in_memory=in_memory, $
out_names=out_names

But I have no success... I have the message:

% Subscript range values of the form low:high must be >= 0, < size,
with low <= high: <BYTE ( 179)>.
% Execution halted at: EVF_INIT_FILE

What could be the problem???

Any comments welcome.

Cheers,
Julio
Re: Raster to Vector [message #43431 is a reply to message #43371] Sun, 10 April 2005 15:37 Go to previous messageGo to next message
julio is currently offline  julio
Messages: 31
Registered: December 2003
Member
Forget it, David...
I don't remember how many times you help me with your codes...
Actually, this IDL group helps a lot of people due to people like you :-)

regards,
Julio
Re: Raster to Vector [message #43432 is a reply to message #43371] Sun, 10 April 2005 09:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> Ok David... I understood the code is not doing what I supposed, so I
> guess the ENVI manual is really wrong.
> I'll try to follow your suggestions to solve my problem. Take it easy
> man, it happens with people not familiar with IDL. I'm not programmer
> and I'm using this tool to solve the problems of my thesis :-)

Actually, I'm sympathetic. I was in the same boat last
week when I just wanted XML to work, I didn't want to
know all the theoretical details! You must have caught me
in the midst of a perfect storm. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Raster to Vector [message #43433 is a reply to message #43371] Sun, 10 April 2005 08:48 Go to previous messageGo to next message
julio is currently offline  julio
Messages: 31
Registered: December 2003
Member
Ok David... I understood the code is not doing what I supposed, so I
guess the ENVI manual is really wrong.
I'll try to follow your suggestions to solve my problem. Take it easy
man, it happens with people not familiar with IDL. I'm not programmer
and I'm using this tool to solve the problems of my thesis :-)

Thanks at any rate!
Julio


> Sorry, I'm testy this morning. I'm trying to get something done
> and I am plagued with e-mails from people not following through
> on earlier suggestions. I'm implementing a "Don't Ask If You
> Don't Want to Read the Answer" policy from now on. :-)
>
> If you got this code from the ENVI manual, then I am going
> to suggest (Heaven forbid!) the manual is wrong, cause that
> code don't do what it is suppose to do!
>
> A couple of judicious PRINT statements in or about the location
> I suggestion yesterday should prove me right. :-)
>
> Cheers,
>
> David
Re: Raster to Vector [message #43443 is a reply to message #43371] Fri, 08 April 2005 09:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Julio writes:
>
>> This code was copied from ENVI help. I just changed the 'values'
>> field. I don't know what 'rtv_doit' does, so I have bo idea what is
>> the problem with this code. I only want to convert some DN values
>> inside my raster image to vector...
>
> Well, then, you made a mistake when you put "values" inside
> of square brackets. It is not doing what you think it is doing,
> as you would discover if you follow through on my previous
> suggestions. :-)

Sorry, I'm testy this morning. I'm trying to get something done
and I am plagued with e-mails from people not following through
on earlier suggestions. I'm implementing a "Don't Ask If You
Don't Want to Read the Answer" policy from now on. :-)

If you got this code from the ENVI manual, then I am going
to suggest (Heaven forbid!) the manual is wrong, cause that
code don't do what it is suppose to do!

A couple of judicious PRINT statements in or about the location
I suggestion yesterday should prove me right. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Raster to Vector [message #43444 is a reply to message #43371] Fri, 08 April 2005 09:46 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Julio writes:

> This code was copied from ENVI help. I just changed the 'values'
> field. I don't know what 'rtv_doit' does, so I have bo idea what is
> the problem with this code. I only want to convert some DN values
> inside my raster image to vector...

Well, then, you made a mistake when you put "values" inside
of square brackets. It is not doing what you think it is doing,
as you would discover if you follow through on my previous
suggestions. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Raster to Vector [message #43459 is a reply to message #43431] Thu, 14 April 2005 01:20 Go to previous message
jnettle1 is currently offline  jnettle1
Messages: 27
Registered: January 2001
Junior Member
For what it's worth, I don't think the help file is wrong, I think
you've copied it wrong. I think the real problem is that you're
setting l_names wrong. In the example you're giving, values is 4096,
and then you set l_names to the same thing, so l_names is also 4096.
But l_names is supposed to be a string array (l_names stands for level
names). This is how they set it in the example code:

envi_file_query, fid, ns=ns, nl=nl, $
class_names=class_names
pos = [0]
values = [1, 2, 3]
dims = [-1, 0, ns-1, 0, nl-1]
l_name = class_names[values]


where class_names are the names of the classes in the input image.
Yours looks like this:


values = [4096] ; the DN I want to convert
l_name = [values]


Try setting l_name to 'level4096' or something and see what you get.

Jeff


Julio wrote:
> Forget it, David...
> I don't remember how many times you help me with your codes...
> Actually, this IDL group helps a lot of people due to people like you
:-)
>
> regards,
> Julio
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: (OT) Web Hosting Special Offer.............
Next Topic: JPEG2000 compression ratios?

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

Current Time: Wed Oct 08 13:44:40 PDT 2025

Total time taken to generate the page: 0.00700 seconds