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

Home » Public Forums » archive » Gridding to the Surface of a Sphere
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Gridding to the Surface of a Sphere [message #83989] Sun, 14 April 2013 09:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Quite frequently you find yourself with randomly positioned data values
that are associated with a latitude and longitude value. You often want
to display this kind of data as a contour plot on a map projection.
Traditionally, the Triangulate/Trigrid method is used to grid random
data values into a 2D grid that can be contoured. And, there is
provision in this method for gridding to the "surface of a sphere,"
which seems like a good thing to do for latitude/longitude data.

But, you would be gravely mistaken. :-)

Personally, I think the Triangulate/Trigrid gridding method for creating
a grid on the surface of a sphere is tragically flawed. (Although I
would be happy to discover otherwise.) I have outlined in some detail my
reasons for thinking this in the following article:

http://www.idlcoyote.com/code_tips/sphericalgrid.php

I also illustrate how this can be done correctly by using GridData to do
the gridding to the sphere, rather than the Triangulate/Trigrid method.

There is one strange thing about the GridData method that I don't
understand and don't mention in the article. Maybe someone can help me
with this. The GridData methods I illustrate (NaturalNeighbor and
InverseDistance) require that I supply Delaunay triangles to the
GridData program. If I create the triangles with Triangulate, all is
well. If I create the triangles with QHull, the GridData program chokes.
Does anyone have any insight into why that would be?

You can find code and data in the article if you care to fool around
with this.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: griddata function and countour plot
Next Topic: idl print call

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

Current Time: Wed Oct 08 15:56:51 PDT 2025

Total time taken to generate the page: 0.00392 seconds