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

Home » Public Forums » archive » mosaic_doit - is it just me?
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
mosaic_doit - is it just me? [message #55449] Wed, 22 August 2007 15:48 Go to next message
Matt[1] is currently offline  Matt[1]
Messages: 23
Registered: December 2006
Junior Member
i have 5 continental files that i want to mosaic into a global file.

i got the mosaic_doit function to run and i get all of my continents
piled up on the upper left corner. i assume that this is because my i
defined these two variables like this:

x0=[0,0,0,0,0]
y0=[0,0,0,0,0]

i assumed that this was asking for the first pixel that you want to
process in each file. apparently i was wrong. does anyone with more
experience know if this is why i'm getting all my continents piled on
top of one another?

is it possible that IDL/ENVI is asking me to place the files manually
on the map space? i guess the left-most part of the north america file
would be x0=0, y0=0, but i have no idea where austrial/eurasia,south
america/africa is! is the software really asking me to do this
manually? that would be crazy.

i have used the envi_convert_file_coordinates command before, but it
requires a reference FID. Is there a way to create a map structure
with an associated FID to use as a reference? i can then extract the
UL from each file and conver to file coordinates associated with a
global map strucutre of the same dimensions as my output file. i dont
really know what i'm talking about here with this suggestion, but
somebody else does....

any input/suggestions?

thanks.
matt s.
Re: mosaic_doit - is it just me? [message #55518 is a reply to message #55449] Thu, 23 August 2007 12:39 Go to previous message
Matt[1] is currently offline  Matt[1]
Messages: 23
Registered: December 2006
Junior Member
thanks for the responses. the link was particularly useful. it's
exactly what i needed. it calculates the x0 and y0 and map info for
you. thanks again.

matt
Re: mosaic_doit - is it just me? [message #55529 is a reply to message #55449] Thu, 23 August 2007 09:41 Go to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
> i got the mosaic_doit function to run and i get all of my continents
> piled up on the upper left corner. i assume that this is because my i
> defined these two variables like this:
>
> x0=[0,0,0,0,0]
> y0=[0,0,0,0,0]
>
> i assumed that this was asking for the first pixel that you want to
> process in each file.

Actually, its the DIMS keyword that subsets the input files. But
that's not what you're looking for...

> is it possible that IDL/ENVI is asking me to place the files manually
> on the map space? i guess the left-most part of the north america file
> would be x0=0, y0=0, but i have no idea where austrial/eurasia,south
> america/africa is! is the software really asking me to do this
> manually? that would be crazy.

Crazy or not, that's what it's looking for. At least, that's how I've
done it. From the documentation, it appears this is called the "pixel
based" method. The help file seems to hint at a "georeferenced"
method that is more intelligent, but it doesn't provide much
explanation.

This ITTVIS techtip may be of use:
http://www.ittvis.com/services/techtip.asp?ttid=3336

> i have used the envi_convert_file_coordinates command before, but it
> requires a reference FID. Is there a way to create a map structure
> with an associated FID to use as a reference? i can then extract the
> UL from each file and conver to file coordinates associated with a
> global map strucutre of the same dimensions as my output file. i dont
> really know what i'm talking about here with this suggestion, but
> somebody else does....

I think you're on the right track. (I'm assuming that your input
images are all georeferenced and have the same projection.) Use
ENVI_GET_MAP_INFO to get the UL coordinates of each input file. If
you're working in a straightforward projection (i.e. geographic), you
can convert these projection coordinates to map coordinates by hand.
If you're working in a more complicated projection, you may need to
create a temp image corresponding to your final product and use it
with ENVI_CONVERT_FILE_COORDINATES, like you said.

At least that's how I would go about it.

-David
Re: mosaic_doit - is it just me? [message #55535 is a reply to message #55449] Thu, 23 August 2007 08:42 Go to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
On Aug 22, 6:48 pm, Matt <mmsmith1...@gmail.com> wrote:
> i have 5 continental files that i want to mosaic into a global file.
>
> i got the mosaic_doit function to run and i get all of my continents
> piled up on the upper left corner. i assume that this is because my i
> defined these two variables like this:
>
> x0=[0,0,0,0,0]
> y0=[0,0,0,0,0]
>
> i assumed that this was asking for the first pixel that you want to
> process in each file. apparently i was wrong. does anyone with more
> experience know if this is why i'm getting all my continents piled on
> top of one another?
>
> is it possible that IDL/ENVI is asking me to place the files manually
> on the map space? i guess the left-most part of the north america file
> would be x0=0, y0=0, but i have no idea where austrial/eurasia,south
> america/africa is! is the software really asking me to do this
> manually? that would be crazy.
>
> i have used the envi_convert_file_coordinates command before, but it
> requires a reference FID. Is there a way to create a map structure
> with an associated FID to use as a reference? i can then extract the
> UL from each file and conver to file coordinates associated with a
> global map strucutre of the same dimensions as my output file. i dont
> really know what i'm talking about here with this suggestion, but
> somebody else does....
>
> any input/suggestions?
>
> thanks.
> matt s.

I'm not sure what's going on either, but here are two suggestions:

1) check to see if x0 & y0 should contain the xstart & ystart values
from the ENVI header. These won't be zero if the images you're using
are subsets of larger images. I'm not sure if that's the problem, but
its worth a check.

2) you can get a map info structure for an image file by calling
ENVI_GET_MAP_INFO using the FID keyword.

Hope that helps,
Jeff
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: strings and memory usage
Next Topic: Re: reading envi file in IDL

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

Current Time: Wed Oct 08 15:37:45 PDT 2025

Total time taken to generate the page: 0.00483 seconds