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

Home » Public Forums » archive » Re: weird behavior of Triangulate
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
Re: weird behavior of Triangulate [message #81272] Sat, 01 September 2012 18:26 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jenny writes:

> David, thanks for sharing. I did compared results from GRIDDATA and
> those from a Fortran code (both using inverse-distance method)for my
> first set of data, and they look identical. So seems GRIDDATA work ok
> for small datasets. However, I agree that for large datasets, such as
> Landsat, other languages (i.e Fortran, C) are much more efficient. I
> don't understand why we shouldn't have confidence in results from
> GRIDDATA? and why it doesn't always work?!

It is reassuring to me that I am not the only one
asking these questions! :-)

Cheers,

David

P.S. Thinking I might have made a mistake with my LandSat
problem, I tried it again earlier this afternoon. I ended
up having to reboot my computer to get things back in
working order. :-(



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: weird behavior of Triangulate [message #81273 is a reply to message #81272] Sat, 01 September 2012 18:10 Go to previous messageGo to next message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
On Sep 1, 10:45 am, David Fanning <n...@idlcoyote.com> wrote:
> Jenny writes:
>> Hi David, I was actually following your example of GRIDDATA:http://
>> www.idlcoyote.com/code_tips/usegriddata.html
>> My data is similar as your NCEP data used in your example, except they
>> are on 0.5 and 0.75 lat/lon degree (unprojected). I should have said
>> they are irregular! Any ideas why Triangulate works on the first set
>> but not the second?
>
> Yes, but did you read that article through to its conclusion?
> If you did, you might agree with me that GridData is a
> bit of a dog's dish.
>
> Every four or five months I get the idea that I ought
> to be able to use GridData to regrid data. I convince
> myself that I know what I am doing, and I start in on
> it. The article you cite was the only time in 5-6 attempts
> that I've even come close to being successful. And, then
> only because I used a small data set.
>
> In my latest attempt, several weeks ago, I used a LandSat
> image band and tried to regrid it to a UTM grid. I started
> the program on a Friday night and just decided to let it run
> until it was finished. I gave up on it sometime Sunday morning
> and killed IDL. I can't really recommend this as a real-time
> solution. :-)
>
> My conclusion is that if you need things regridded (and
> if you work with satellite images, this is *always*
> required, eventually), you will have to use something other
> than IDL to do the job.

David, thanks for sharing. I did compared results from GRIDDATA and
those from a Fortran code (both using inverse-distance method)for my
first set of data, and they look identical. So seems GRIDDATA work ok
for small datasets. However, I agree that for large datasets, such as
Landsat, other languages (i.e Fortran, C) are much more efficient. I
don't understand why we shouldn't have confidence in results from
GRIDDATA? and why it doesn't always work?!

Jenny
Re: weird behavior of Triangulate [message #81283 is a reply to message #81273] Sat, 01 September 2012 07:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jenny writes:

> Hi David, I was actually following your example of GRIDDATA:http://
> www.idlcoyote.com/code_tips/usegriddata.html
> My data is similar as your NCEP data used in your example, except they
> are on 0.5 and 0.75 lat/lon degree (unprojected). I should have said
> they are irregular! Any ideas why Triangulate works on the first set
> but not the second?

Yes, but did you read that article through to its conclusion?
If you did, you might agree with me that GridData is a
bit of a dog's dish.

Every four or five months I get the idea that I ought
to be able to use GridData to regrid data. I convince
myself that I know what I am doing, and I start in on
it. The article you cite was the only time in 5-6 attempts
that I've even come close to being successful. And, then
only because I used a small data set.

In my latest attempt, several weeks ago, I used a LandSat
image band and tried to regrid it to a UTM grid. I started
the program on a Friday night and just decided to let it run
until it was finished. I gave up on it sometime Sunday morning
and killed IDL. I can't really recommend this as a real-time
solution. :-)

My conclusion is that if you need things regridded (and
if you work with satellite images, this is *always*
required, eventually), you will have to use something other
than IDL to do the job.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: weird behavior of Triangulate [message #81284 is a reply to message #81283] Sat, 01 September 2012 07:17 Go to previous messageGo to next message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
On Sep 1, 9:59 am, David Fanning <n...@idlcoyote.com> wrote:
> Jenny writes:
>> Hi, I'm trying to use GRIDDATA to convert two sets of regular grids
>> (lat/lon) to a projected grid (Equal Area).
>
> Say what!? Why are you doing that?

Hi David, I was actually following your example of GRIDDATA:http://
www.idlcoyote.com/code_tips/usegriddata.html
My data is similar as your NCEP data used in your example, except they
are on 0.5 and 0.75 lat/lon degree (unprojected). I should have said
they are irregular! Any ideas why Triangulate works on the first set
but not the second?

Thanks!
Jenny
Re: weird behavior of Triangulate [message #81285 is a reply to message #81284] Sat, 01 September 2012 06:59 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jenny writes:

> Hi, I'm trying to use GRIDDATA to convert two sets of regular grids
> (lat/lon) to a projected grid (Equal Area).

Say what!? Why are you doing that?

Triangulate has never worked well on regularly gridded
data, which is what you are giving it here. But, honestly,
I see no reason whatsoever to even be using it. The
Map_Proj_* routines are really all you need here.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: weird behavior of Triangulate [message #81335 is a reply to message #81283] Thu, 06 September 2012 07:06 Go to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
On Saturday, 1 September 2012 16:45:46 UTC+2, David Fanning wrote:

> My conclusion is that if you need things regridded (and
> if you work with satellite images, this is *always*
> required, eventually), you will have to use something other
> than IDL to do the job.

Could you elaborate a bit on that conclusion?

I work in an institute where IDL has been used as the main tool for analysis of remote sensing data for nearly 3 decades, so this statement puzzles me...

I can only think of the following issues:

* IDL didn't have support for map projections until version 5.6 or so. Before that, we wrapped the PROJ.4 library to do the job. But the MAP_PROJ_* functionality has now been available for almost a decade (with some inherent problems that are possible to work around).

* Satellite data are large, so GRIDDATA might not work too well if you operate directly on the entire data set. Solution: divide-and-conquer. Divide your output grid in blocks, and process separately. Should normally be possible to make an efficient solution based on GRIDDATA and/or INTERPOLATE.

But I have a feeling you have something else in mind?

--
Yngvar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Idl error handling - is there a way to force a time out?
Next Topic: Parrallel Matrix Inversion in IDL?

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

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

Total time taken to generate the page: 0.00895 seconds