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

Home » Public Forums » archive » latitude, longitude and a data point
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: latitude, longitude and a data point [message #63616 is a reply to message #63422] Wed, 12 November 2008 12:29 Go to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
Peter,

If your lat and lon arrays are already points on a 2d grid, David's
solution works. If they are points you wish to lay on an arbitrary
grid, it works like this:

h2=hist_nd(transpose([[longitude],[latitude]]),[bin_x,bin_y] ,min=
[-180,-90],max=[179.999999,89.99999],reverse_indices=ri2); grid
val2=h2*0.0d; initialize
for i=0l,n_elements(h2)-1 do if(h2[i] gt 0) then val2[i]
=MEAN_OR_WHATEVER(values[ri2[ri2[i]:(ri2[i+1]-1)]]); calculate

If that looks like black magic, go to David's website and search for
"horror disgust".

--Edward H.
[Message index]
 
Read Message
Read Message
Previous Topic: IDL Workbench Debugging
Next Topic: Re: 2-d fitting

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

Current Time: Sun Oct 12 09:28:34 PDT 2025

Total time taken to generate the page: 1.12107 seconds