Professional Documents
Culture Documents
NCSU GIS/MEA582:
Geospatial Modeling and Analysis
Syllabus
Schedule
Introduction
Logistics
Topics
Projects
FAQs
In startup pannel set GRASS GIS Database Directory to path to datasets, for example on MS Windows, C:\Users\myname\grassdata. For GRASS
Location select nc_spm_08_grass7 (North Carolina, State Plane, meters) and for GRASS Mapset create a new mapset (called e.g. HW_hydrology)
and click Start GRASS session.
grass74
Download all text files with site locations (see above) to the selected directory. Now you can use the commands from the assignment requiring the
text file without the need to specify the full path to the file. start GRASS
http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/hydrology.html 1/5
16/10/2018 GIS/MEA582: Geospatial Modeling and Analysis
Compute flow direction, flow accumulation and subwatersheds with approx. size of 10000 cells from 30m NED.
g.region raster=elev_ned_30m -p
r.watershed -s elevation=elev_ned_30m threshold=10000 accumulation=accum_10K drainage=draindir_10K basin=basin_10K
Convert to vector format and display results along with the official Wake county streams (red):
r.to.vect -s basin_10K output=basin_10K type=area
r.thin streams_der_30m output=streams_der_30m_t
r.to.vect -s streams_der_30m_t out=streams_der_30m type=line
Generate shaded map and display: How do the derived streams compare with the official stream map?
How can you modify the mapcalc expression to make stream origins fit better with the official stream map?
d.erase
d.his hue=basin_10K intensity=elevation_shade brighten=40
d.vect basin_10K type=boundary
d.rast lakes
d.vect streams_der_30m color=blue
d.vect streams color=red
d.out.file mystreams
Depression filling is often necessary for certain flow routing algorithms but it can alter the elevation data significantly. Find out how extensive the
depressions are in our DEM.
Note that r.watershed doesn't need any depression filling thanks to its underlying algorithm which uses least cost path to get over depressions.
g.region raster=elevation -p
r.fill.dir input=elevation output=elev_fill1 direction=dir1 areas=unres1
r.fill.dir input=elev_fill1 output=elev_fill2 direction=dir2 areas=unres2
r.fill.dir input=elev_fill2 output=elev_fill3 direction=dir3 areas=unres3
r.mapcalc "depr_bin = if((elevation-elev_fill3) < 0., 1, null())"
r.colors depr_bin color=blues
Remove all previously used layers from the Layer Manager and display the new results, compare the derived depressions with actual lakes:
d.erase
d.rast elevation
http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/hydrology.html 2/5
16/10/2018 GIS/MEA582: Geospatial Modeling and Analysis
d.vect roadsmajor
d.rast depr_bin
d.vect lakes type=area fill_color=blue
d.out.file depressions
d.erase
d.rast ortho_2001_t792_1m
d.rast accum_5K values=1000-1000000
Create a vector map with the point east=638845.52 north=220085.26 (download the text file) that has accum_5K=224510.
Delineate the contributing area associated with this outlet and convert it to vector format:
r.water.outlet input=draindir_5K output=basin_A30 coordinates=638845.52,220085.26
r.to.vect -s basin_A30 output=basin_A30 type=area
Compare the extracted streams (accum > 800) with official stream data:
d.rast ortho_2001_t792_1m
d.rast accum_5K values=800-1000000
http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/hydrology.html 3/5
16/10/2018 GIS/MEA582: Geospatial Modeling and Analysis
d.vect streets_wake color=red
d.vect streams color=green
Extract streams from the carved DEM and compare with the official streams map.
What is the difference between accum_5K, accumc_5K1m and streams?
Explain the advantage and disadvantage of carving.
r.watershed -as elevation=elev_lidcarved_1m threshold=50000 accumulation=accumc_5K1m
d.rast accumc_5K1m values=1500-10000000
d.vect streams
d.out.file streamcarved
Compare upslope and downslope flow lines: On what type of landform (ridge, valley) they converge?
d.erase
g.region raster=elev_lid792_1m -p
r.flow elevation=elev_lid792_1m flowline=flowlines flowlength=flowlg_1m flowaccumulation=flowacc_1m
r.flow -u elevation=elev_lid792_1m flowlength=flowlgup_1m flowaccumulation=flowaccup_1m
d.rast flowacc_1m
d.vect elev_lid792_cont_1m color=red
d.rast flowaccup_1m
d.vect elev_lid792_cont_1m color=red
d.vect flowlines
d.out.file flowlines
http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/hydrology.html 4/5
16/10/2018 GIS/MEA582: Geospatial Modeling and Analysis
d.vect streams
d.out.file stream_mfd
Create a map of flooded area for a given water level and seed point:
r.lake elevation=elev_lid792_1m water_level=113.5 lake=flood1 coordinates=638728,220278
d.rast elev_lid792_1m
d.rast flood1
d.out.file floodedarea
Increase water level to 113.7m and 114.0m and create flooded area maps at these two levels.
Moodle site
Computing Help
GIST Home
Disclaimer
Accessibility
http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/hydrology.html 5/5