raster to vector conversion [message #36454] |
Wed, 17 September 2003 10:36  |
aesculapx
Messages: 2 Registered: September 2003
|
Junior Member |
|
|
hi,
i am looking for an idl routine that converts raster images into
vector data. does anybody know where i can find such a vectorization
routine for IDL?
thanx
|
|
|
Re: Raster to Vector [message #43364 is a reply to message #36454] |
Thu, 07 April 2005 12:49   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Julio writes:
> 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???
I would guess that this line:
in_memory = lonarr(n_elements(values))
is not doing what you think it is doing. :-)
Why don't you print out N_ELEMENTS(values) and see what you think.
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 #43445 is a reply to message #43364] |
Fri, 08 April 2005 09:41  |
julio
Messages: 31 Registered: December 2003
|
Member |
|
|
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...
Julio
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1cbf3cb3c8bdc4389899b1@news.frii.com>...
> Julio writes:
>
>> 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???
>
> I would guess that this line:
>
> in_memory = lonarr(n_elements(values))
>
> is not doing what you think it is doing. :-)
>
> Why don't you print out N_ELEMENTS(values) and see what you think.
>
> Cheers,
>
> David
|
|
|