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

Home » Public Forums » archive » Re: spawn GDAL???
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: spawn GDAL??? [message #80888 is a reply to message #80886] Wed, 18 July 2012 11:58 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, July 18, 2012 1:02:10 PM UTC-4, AB wrote:
> Hi group,
>
> Anyway to call gdal from IDL using SPAWN? Currently I have gdal wrapped up in a small shell script that loops through days of year. Seems like SPAWN has no problem with the shell script, but once it gets to gdal_merge.py, I get error messages.
>
> ________________________________________________________
>
> Here is the call in IDL:
>
> spawn, 'sh /home/scripts/mosaic_8day.sh'
>
>
> Here is the shell script:
>
>
> # Loop through each directory
> for i in `ls -d /usr/local/snow/data/archive/2004/*`
> do
> cd $i
>
> var=$i
>
> #extract date from directory name
> date=${var:64:67}
>
> echo $date
>
> gdal_merge.py MOD09GA.*.h09v05.8DAY.tif MOD09GA.*.h09v04.8DAY.tif MOD09GA.*.h10v04.8DAY.tif -o UCRB.$date.8DAY.tif
>
> done
>
> _______________________________________
>
> Any thoughts?
>
> Thanks!
> Annie

It's unfortunate that you didn't post what the error message was. The obvious thing to check is that your path is set correctly within the script and that your 'gdal' is in the path and executable. Also, to make sure that the wildcard patterns in your command line actually match something.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Library Updates
Next Topic: IDL Statistical Tests

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

Current Time: Fri Oct 10 17:42:58 PDT 2025

Total time taken to generate the page: 0.50242 seconds