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

Home » Public Forums » archive » Re: mapping/interpolation from one irregular grid to another (different) irregular grid.
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: mapping/interpolation from one irregular grid to another (different) irregular grid. [message #79022 is a reply to message #79019] Tue, 24 January 2012 15:54 Go to previous messageGo to previous message
Klemen is currently offline  Klemen
Messages: 80
Registered: July 2009
Member
If you want to map high resolution data (e.g, MODIS) with the
footprint of the lower resolution data (e.g. SEVIRI), try something
like:

1. Run through all low resolution (LR) pixels (1 or 2 for loops)
- find the closest pixel of datasets having high resolution (HR)
within the dataset having LR: MATCH_2D
- assume that not more than e.g. 10 HR pixels left, right, up, down
from this centre HR pixel can be witin the LR pixel
- once you constrain the possible HR pixels to check, construct (from
the centre points of LR pixels) the LR pixel you are currently
processing and check, which of the high resolution pixels fall in:
ROIobj->IDLanROI::ContainsPoints
- assign an index to these pixels so you can later recognize, which
high res pixels correspond to one

2. This points depend on what you really want to do, if you want to
interpolate than you shoud in preivous step estimate also the distance
between LR centre and each corresponding HR pixel. Here is an example
for aggregation - average all HR pixel to LR pixel.

h=histogram(HR_index, REVERSE_INDICES=ri,omin=om)
gmax = max(h) ;Highest number of duplicate indicies
for j=1,gmax do begin
g = where(h GE j, Ng)
if Ng GT 0 then begin
LR[om+g] = (LR[om+g]*(j-1.) + HR[ri[ri[g]+j-1]]) / j
endif
endfor

If the resolutions of both datasets are significantly different (10 HR
pixels covers 1 LR), then this might be quite fast - the point 2 is
rapid, it takes me about a minute to compute point 1 (LR: 350×150
pixels, HR: 900×600 pixels)

Cheers, Klemen
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Calling all DLM experts- debugging in MSVC++ 2010
Next Topic: fatal error : double free or corruption (!prev)

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

Current Time: Sun Oct 12 04:44:29 PDT 2025

Total time taken to generate the page: 2.08324 seconds