10.07.2015 Views

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

Finding Potential Sites for Small-Scale Hydro Power in Uganda: a ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The eight pixels <strong>in</strong> the “3 x 3 search-w<strong>in</strong>dow” are all exam<strong>in</strong>ed to see:o if their value is larger than zero - the algorithm should only exam<strong>in</strong>e cellsconta<strong>in</strong><strong>in</strong>g riverso if the value is lower or equal to the current pixel’s value - the search should notbe able to proceed up-streamo if the pixel has been exam<strong>in</strong>ed earlier <strong>in</strong> the ten-pixel loop - <strong>in</strong> order not to getstuck <strong>in</strong> a loop between two cells with the same pixel valueThe pixels, which fulfill these criteria, are then exam<strong>in</strong>ed to calculate the best heightdifference from the current pixel, <strong>in</strong> order to know which pixel to go next. The calculatedheight difference is saved <strong>in</strong>to a variable, which accumulates <strong>for</strong> each new cell. As can beseen <strong>in</strong> Figure 4.9, Iteration 1.2, the new pixel where to start from is at row three andcolumn three. The whole process is repeated until ten connected cells have been visitedor until the “river” ends, which is illustrated <strong>in</strong> Figure 4.9, Iteration 1.9. If theaccumulated height value is 20 meters or more, the visited cells, which coord<strong>in</strong>ates havebeen stored <strong>in</strong> a temporary variable, are stored <strong>in</strong>to the matrix “OUTPUT”, which canbe seen <strong>in</strong> Iteration 1 <strong>in</strong> Figure 4.9. In the case of Iteration 2 <strong>in</strong> Figure 4.9, the river-cellsaccumulated height value does not reach the required value of 20 meters and arethere<strong>for</strong>e not stored <strong>in</strong> “OUTPUT”. Iteration14 <strong>in</strong> Figure 4.9 illustrates the course ofevents when the search beg<strong>in</strong>s <strong>in</strong> the last pixel <strong>in</strong> a river. In this case there is only oneconnect<strong>in</strong>g river cell <strong>in</strong> the “3 x 3 search w<strong>in</strong>dow”, but s<strong>in</strong>ce it is upstream, the searchwill be aborted and no output is stored.Inord er <strong>for</strong> the algorithm to present a correct result, anassum ption that rivers or streams never branch offdownstream <strong>in</strong> hilly areas has been made. The reason <strong>for</strong>this assumption is that our algorithm <strong>in</strong> such cases (seeFigure 4.10) is limited s<strong>in</strong>ce it only chooses the branch withthe best height difference and leaves one branchunattended. If this branch <strong>in</strong>dividually has a heightdifference of 20 meter it will also be stored <strong>in</strong> “OUTPUT”.In cases of same height difference the algorithm choosesthe last found branch.Figure 4.10 The unlikelyphenomenon of downstreambranch<strong>in</strong>g off rivers43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!