Hy,<br><br>Thanks for your help Frank,it&#39;s allowed me to improve my program from 200s to 14s that&#39;s show a great progress.<br><br>I didn&#39;t understand what is &quot;rolling mean&quot; could you please explain me?<br>
<br>An other question, is it possible to make multithread process?<br><br>thanks a lot for your help<br><br>Best regards,<br><br>Nicolas<br><br><br><br><br><br><br><br>Once you overhaul things to operate on substantial swaths of data, there<br>

may also be some other opportunities for optimizing within your algorithm<br>
(rolling means, for instance) but first solve the big IO overhead bottleneck.<br><br><br><br><br><br><div class="gmail_quote">2009/4/15 Frank Warmerdam <span dir="ltr">&lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Nicolas DEGARNE wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I read on help and /gdal.h/ File Reference that it could exist faster way so I have some ideas like :                    Merging the code to c++<br>
             Using Read/Write block<br>
             Use Tile/Block to accelerate the process<br>
             Use the Warpprocess to calulate windows mean&#39;s faster<br>
<br>
I hope you understand my request and it was clear<br>
        <br>
</blockquote>
<br></div>
Nicolas,<br>
<br>
My advice would be to read an entire 5 line swath into a buffer, and<br>
then operate within that buffer.  Very small read/write operations<br>
are pretty expensive with GDAL and your approach of reading five pixels<br>
off one line as a single request is very very fine grained.<br>
<br>
Switching to C++ will not help noticably (just reducing one level of<br>
function call overhead, and a bit of extra checking the C API provides).<br>
<br>
At this point there is little value in going to exact TIFF tiles or using<br>
the block API.<br>
<br>
The Warp API is also going to be very high overhead to compute means.<br>
<br>
Once you overhaul things to operate on substantial swaths of data, there<br>
may also be some other opportunities for optimizing within your algorithm<br>
(rolling means, for instance) but first solve the big IO overhead bottleneck.<br>
<br>
Best regards,<br><font color="#888888">
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush    | Geospatial Programmer for Rent<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br> Nicolas Degarne<br> 76 rue de Nancy<br> 94170 Le Perreux<br>06 84 93 80 94<br><a href="mailto:nicolas.degarne@gmail.com">nicolas.degarne@gmail.com</a><br><br>