slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Routine Performed for Each Origin Cell PowerPoint Presentation
Download Presentation
Routine Performed for Each Origin Cell

Loading in 2 Seconds...

play fullscreen
1 / 9
jakeem-mooney

Routine Performed for Each Origin Cell - PowerPoint PPT Presentation

94 Views
Download Presentation
Routine Performed for Each Origin Cell
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Routine Performed for Each Origin Cell There is another set of loops that cycle through Origin Cells once the D8 Neighbor procedure completes

  2. 1. Extract Data to Array(s) Get data from all layers that corresponds to current cell coordinates, and store in temporary array(s). Using a dynamic array probably best since the number of rows is unknown origin 1 1 2 2 2 STOP arrays/lists

  3. 2. Move Movement: Origin Pixel Value = 1 “1” Translates to (c+1, r) origin 1 1 2 2 ???If statement vs array for translating??? 2 STOP 'X Coordinate Codes xC(1) = 1 xC(2) = 1 xC(4) = 0 xC(8) = -1 xC(16) = -1 xC(32) = -1 xC(64) = 0 xC(128) = 1 'Y Coordinate Codes yC(1) = 0 yC(2) = 1 yC(4) = 1 yC(8) = 1 yC(16) = 0 yC(32) = -1 yC(64) = -1 yC(128) = -1 For N = 1 To 8 NextPixel = pPixels(c + xC(N), r + yC(N)) … Next

  4. 3. Extract Data to Array(s) Get data from all layers that corresponds to current cell coordinates, and store in temporary array(s). origin 1 1 2 2 2 STOP arrays/lists

  5. 2. Move Movement: Origin Pixel Value = 1 “2” Translates to (c+1, r+1) origin 1 1 2 2 ???If statement vs array for translating??? 2 STOP 'X Coordinate Codes xC(1) = 1 xC(2) = 1 xC(4) = 0 xC(8) = -1 xC(16) = -1 xC(32) = -1 xC(64) = 0 xC(128) = 1 'Y Coordinate Codes yC(1) = 0 yC(2) = 1 yC(4) = 1 yC(8) = 1 yC(16) = 0 yC(32) = -1 yC(64) = -1 yC(128) = -1 For N = 1 To 8 NextPixel = pPixels(c + xC(N), r + yC(N)) … Next

  6. 3. Extract Data to Array(s) Get data from all layers that corresponds to current cell coordinates, and store in temporary array(s). origin 1 1 2 2 2 STOP arrays/lists

  7. 4. Stop origin 1 1 2 A stop condition is met, we are at the edge 2 2 STOP

  8. 5. Calculate Once STOP is met, the array(s) can be combined in many ways and then the result(s) are written to the location of the origin cell on the output raster(s). origin 1 1 2 The flow path sequence is preserved in the index of the array 2 0 1 2 3 4 2 STOP 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 arrays/lists Writes to corresponding cell Math Machine 1 set per origin pixel output raster(s)

  9. 6. RINSE AND REPEAT Data are cleared from the temporary arrays, and we start with a new origin pixel The term Origin Pixel really refers to a starting location in an array, because the whole time we are dealing with arrays