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

Home » Public Forums » archive » problem with spatial subset
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
problem with spatial subset [message #59346] Fri, 21 March 2008 07:41 Go to next message
chemsat is currently offline  chemsat
Messages: 4
Registered: March 2008
Junior Member
Hello all
I have a big problem with writing script for spatial subsetting one image
by another in idl. It's easy to do in ENVI. But I must process a large
number of images. Could anybody help me with example.

Thanks!
Gulshat



*** Sent From/Enviado desde: http://groups.expo.st ***
Re: problem with spatial subset [message #59443 is a reply to message #59346] Wed, 26 March 2008 10:08 Go to previous message
negra is currently offline  negra
Messages: 9
Registered: March 2008
Junior Member
On 24 мар, 23:11, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca> wrote:
> negra wrote:
>>   Hello all!
>
>> Could anybody help me withspatialsubsetting one image by another in
>> idl. It's easy in Envi, but I must process a large number of files.
>
>> Thanks!
>> Gulshat
>> *** Sent From/Enviado desde:    http://groups.expo.st***
>
> Hi,
> you can follow these steps in IDL:
>
> get access to ENVI's functions: envi, /restore_base_save_files
>                                 envi_batch_init
> Open your mask image: ENVI_OPEN_FILE
> Get the map information:  ENVI_GET_MAP_INFO
> Extract the corners coordinates from the map info.
> Open your image tosubset
> get the data of the image tosubset: read_binary
> change the mask coordinates to the image coordinates (geographical
> coords to column/row coordinates): ENVI_CONVERT_FILE_COORDINATES
> Nowsubsetthe image: sub = image[x[0]:x[1],y[0]:y[1]]
> Save the data: ENVI_WRITE_ENVI_FILE   (you might want to do a
> envi_file_query on the mask image AND on the original image to get the
> proper header values)
>
> Jean

Thanks, I shall try to realize it. But I don't know still how to
> Extract the corners coordinates from the map info.

Gulshat
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: problem with subset one image by another
Next Topic: concatenate arrays of different sizes

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

Current Time: Wed Oct 08 11:53:57 PDT 2025

Total time taken to generate the page: 0.00564 seconds