In this project you will create a tool for visualization and basic flow modeling of grid terrains. The required functionality is to visualize a grid (2D or 3D) and compute flow direction and flow accumulation of a grid.
If invoked with a second grid as argument, the display function
should display the second grid (the color grid) draped on top of the
first grid (the surface grid). This functionality is useful for
viewing terrain attributes like flow direction and flow accumulation
draped on top of the elevation. Here is an example of flow
accumulation of a terrain drawn on top of the elevation:
The interface is open-ended, but ideally the user would be able to perform any combination of these commands on any grid dataset. For instance:
dover: > mygis
..Starting MyGIS program.
mygis> help
..Usage:
display surf=<grid-name> [col=<grid-name>]
computeFD elev=< grid-name> dir=<grid-name>
computeFA dir=< grid-name> accu=<grid-name>
help
exit
mygis> display
..usage: display surf=<grid-name> [col=<grid-name>]
mygis> display surf=set1.asc
..Displaying set1.asc
mygis> display surf=kaweah.asc
..Displaying kaweah.asc
mygis> computeFD elev=kaweah.asc dir=kaweahFD.asc
..Computing FD for kaweah.asc
mygis> display surf=kaweahFD.asc
..Displaying kaweahFD.asc
mygis> display surf=kaweah.asc col=kaweahFD.asc
..Displaying kaweahFD.asc draped over kaweah.asc
mygis> computeFA dir=kaweahFD.asc accu=kaweahFA.asc
...Computing FA for kaweah.asc
mygis> display surf=kaweah.asc col=kaweahFA.asc
..Displaying kaweahFA.asc draped over kaweah.asc
mygis> display surf=kaweahFD.asc col=kaweah.asc
..Displaying kaweah.asc draped over kaweahFD.asc
mygis> display surf=sierra.asc
..Displaying sierra.asc
mygis> exit
..Exiting. Bye.
dover: