Derive all subcatchments from a DEM using PCRaster in QGIS

  Рет қаралды 8,463

Hans van der Kwast

Hans van der Kwast

Күн бұрын

This video shows how to use the PCRaster QGIS tools to derive all subcatchments from a DEM.
We'll convert a DEM in GeoTIFF format to PCRaster format. Then we'll derive the local drain direction map. Next, the streamorder tool is used to derive the Strahler orders. After calibration we determine the orders of the channels from which we derive the outlets of the subcatchments.
*NOTE THAT THE WORKFLOW CAN NOW BE DONE WITH THE PCRASTER TOOLS PLUGIN, WHICH HAS SOME BUGS FIXED*
0:00 Introduction and workflow
1:53 Convert to PCRaster format
2:20 Create local drain direction map (lddcreate)
3:20 Calculate Strahler orders (streamorder)
4:07 Derive channels from Strahler orders
5:32 Create lookup table with RAT
6:37 Reclassify Strahler orders (lookup)
7:24 Find downstream Strahler order (downstream)
7:52 Use raster calculator to find junctions
9:07 Give outlets unique ID (uniqueid)
9:56 Convert layer data type
10:30 Create nominal zero map (spatial)
10:49 Fill nodata (cover)
11:24 Derive subcatchments (catchment)
12:00 Derive subcatchments (subcatchment)
12:44 Give subcatchments their Strahler order (areamaximum)
Link to repository: github.com/jvdkwast/qgisrepos...
Linkt to PCRaster: www.pcraster.eu
#PCRaster #QGIS

Пікірлер: 56
@MrLikeidontcare
@MrLikeidontcare 3 жыл бұрын
Great work as usual!
@davidedimauro4804
@davidedimauro4804 2 жыл бұрын
Good work Hans & Nyall!
@davidhartmann4174
@davidhartmann4174 3 жыл бұрын
Bedankt voor al je video’s! Ik studeer zelf Earth Surface and Water en deze video’s zijn erg leerzaam!
@user-lb1wu8xg3p
@user-lb1wu8xg3p 8 ай бұрын
Hi, Hans. For the last 2 years i have always failed to installed PCRaster plugin in the QGIS. But, this is not the case with the latest version of 3.34 anymore. The instalation proccess were running without any issue and i have successfuly tested the PCRaster in subcatchment delineation as in this tutorial video. Thanks
@manokito04
@manokito04 Жыл бұрын
Hello Sir Hans, your videos have really helped me a lot in exploring qgis, thank you so much! I'm quite curious in deriving the subcatchments, is there a way to calibrate or input somewhat a threshold that could result in lesser number of subcatchments?
@HansvanderKwast
@HansvanderKwast Жыл бұрын
The lower the Strahler threshold you use, the more subcatchments you get. So you can play with the threshold value and see what works best.
@anwarmaqsood9764
@anwarmaqsood9764 8 ай бұрын
Hi. Is there a way to locate the last downstream cells of multiple streams/rivers which can be used as outlets for catchment delineation?
@jzz0625
@jzz0625 3 жыл бұрын
Hi Hans, Great video, I don't understand the last step why a strahlerorder cathcment value '1' can be next to a strahler order '4' catchment. Should it not outflow through a catchment with one strahler order lower, as it does show in the StrahlerChannels.map layer? Keep up the great video's
@HansvanderKwast
@HansvanderKwast 3 жыл бұрын
Thanks. Smaller order tributaries can end up in higher order channels, see this video on the Strahler order method: kzbin.info/www/bejne/iaapnWt7jKmknLc. The order only increases if channels of the same order join. Two notes: (1) Catchments are nested. So downstream outlets have a catchment that cover those from the upstream. (2) Often users don't want to have this effect of downstream catchments covering the upstream ones. This is the difference between the catchment and subcatchment tools of PCRaster.
@Somone_final_final_v2
@Somone_final_final_v2 Жыл бұрын
I've started trying to get these steps into a model/process worflow. Before I finished making it thought would ask if you've already made one as some steps seem to cause issues if use on the fly outputs.
@HansvanderKwast
@HansvanderKwast Жыл бұрын
Yes, you can find models and scripts in the Resource sharing repository. See kzbin.info/www/bejne/gZPNeqZ8gcSDma8
@abdulelahalzerwi3576
@abdulelahalzerwi3576 3 жыл бұрын
Hello, Thank you for the very informative videos you provided. I have a question that how to get subcatchments from a single one? Thank you
@HansvanderKwast
@HansvanderKwast 3 жыл бұрын
Can you please explain what you mean with "from a single one"? For deriving subcatchments also check this playlist: kzbin.info/aero/PLeuKJkIxCDj2Gk0CkcJ-QeviE41aMZd-5
@kuducamper9934
@kuducamper9934 2 жыл бұрын
QGIS 3.14.15 doesn't have the 'scalar' option in Output Data Type when converting geotiff to .map format. When I used Raster > conversion > translate, the geotiff was converted to .map but was shifted north slightly!
@valentinabau1874
@valentinabau1874 Жыл бұрын
This is great! Thanks. But why when I find the strahler order of the catchment I get a raster whose min is -1.. ? Did I make a mistake? I am following exactly the same steps.
@HansvanderKwast
@HansvanderKwast Жыл бұрын
That is indeed strange. As far as I know the streamorder algorithm can't produce that. Did you find the minimum value in the Layer properties?
@Alice-tp9ts
@Alice-tp9ts 22 күн бұрын
Hello, thank you for all your videos they have been a great help. My first hurdle is my Raster attribute table has the edit toggle greyed out. I also am getting an error when trying to us the Lookup tool, resulting in no excel sheet produced. Do you have any solutions? thank you
@HansvanderKwast
@HansvanderKwast 21 күн бұрын
Hi. The problem with the RAT is know and fixed. It will be working in the next release. See github.com/qgis/QGIS/issues/57795. Lookup tool reads a lookuptable in text format, not Excel and it is an input. The result is a reclassified raster. Lookup table from RAT exports the RAT to a text file in the lookup table format.
@natureadventure4492
@natureadventure4492 3 жыл бұрын
Very informative and useful video. I have one problem. Not able to get option of add attribute table in the stream order output raster .map file. How can I get that?
@HansvanderKwast
@HansvanderKwast 3 жыл бұрын
You need to use the new Raster Attribute Table plugin. It's covered in this video: kzbin.info/www/bejne/gKuph6ijqK-bfs0
@natureadventure4492
@natureadventure4492 3 жыл бұрын
Thank you
@abigaila.jubilee6329
@abigaila.jubilee6329 3 жыл бұрын
Dear Prof Hans, I have downloaded the hydro plugin for points for catchment but couldn't find Ldd ( Local drain drainage) and the rest of the plugins that you're currently using in this video. How can I find the pulgins? Thanks very much
@HansvanderKwast
@HansvanderKwast 3 жыл бұрын
You need to install QGIS and PCRaster in conda. Check this playlist: kzbin.info/aero/PLeuKJkIxCDj2xbV45C45wz3N89FvmTuSu The first video gets you started. The last one is a more elaborate one also giving more context. The other videos highlight some themes.
@abigaila.jubilee6329
@abigaila.jubilee6329 3 жыл бұрын
@@HansvanderKwast Thanks so much Prof. I'm currently using QGIS 3.16 using family computer. I have managed to understand command prompt about using previous environment in Anaconda. Right now, I have reached the Strahler order following the guidelines in this video. But I don't see any attribute table when I have right clicked the Strahler using QGIS 3.16. What should I do? Thanks very much
@HansvanderKwast
@HansvanderKwast 3 жыл бұрын
@@abigaila.jubilee6329 The Raster Attribute Table is a very new feature in QGIS. You need to install an experimental plugin in order to use it. Check this video: kzbin.info/www/bejne/gKuph6ijqK-bfs0. Also check the description of the video for more details.
@danieldoucelin8485
@danieldoucelin8485 Жыл бұрын
Hello prof Hans ! First of all, I'd like to thank you for sharing this precious videos. They really helped me !!! I'm facing an issue on this topic when converting to PCRaster Format. It only succeeds when I'm not saving the file (temporary file). Do you know why ? Regards, Daniel.
@HansvanderKwast
@HansvanderKwast Жыл бұрын
The temporary format is probably still tiff and can not be accepted by the gdal python code that needs to write the prcraster format properties.
@paulasantandreu2891
@paulasantandreu2891 2 жыл бұрын
Really good video, as always! However, when I try to create the LDD layer, my computer always freezes, and I cannot get results. Is that common?
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
Lddcreate is quite calculation intensive. You probably have a large DEM. While QGIS freezes, it's probably still processing. Try to wait longer. It could take really long with large data. You can test it on a small DEM to see if it works.
@paulasantandreu2891
@paulasantandreu2891 2 жыл бұрын
@@HansvanderKwast Thanks Hans, I left it the whole weekend and it worked. However, now when I'm trying to create the "new attribute table" for the Strahler layer, QGIS doesn't show me the option. Do you know if I could do this step in another way?
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
You need to first style the layer with the Layer Styling panel. Then the option should show up. I assume you've installed the Raster Attribute Table plugin already.
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
Also check my new playlist QGISHydro 2 Chapter 4.
@paulasantandreu2891
@paulasantandreu2891 2 жыл бұрын
@@HansvanderKwast Solved! (it was the plugin)
@markdominicgalerio1234
@markdominicgalerio1234 Жыл бұрын
Dear prof Hans, I am encountering a problem with regards to the attribute table. When I right click my created "Strahler" layer, "Open Attributes Table" does not come out. It is also disabled or can not be clicked under "Layers" tab. How can I resolve this? Thanks!
@HansvanderKwast
@HansvanderKwast Жыл бұрын
Did you install the Raster Attribute Table plugin? If so, try to remove and add the layer again. Also check this video: kzbin.info/www/bejne/hKCcemaGfdSZqdU
@markdominicgalerio1234
@markdominicgalerio1234 Жыл бұрын
@@HansvanderKwast Apologies for the late response. Thank you very much for your help prof Hans!
@raghukambaiah7031
@raghukambaiah7031 3 жыл бұрын
Hello Sir, kindly upload a video of Weighted Overlay Analysis using QGIS
@aparnasharma8026
@aparnasharma8026 2 ай бұрын
Hi, I'm unable to convert junctionid to nominal, as it is raising an exception of crs_wkt. Can you please suggest how to overcome this? Thanks.
@HansvanderKwast
@HansvanderKwast 2 ай бұрын
The error is for some reason related to your projection. What you can do is to delete the xml file of your input layer, so all projection info is removed. Then run the tool again and assign the correct projection back to the input and created output.
@andreasalgado8244
@andreasalgado8244 Жыл бұрын
Can I know the size of the subcatchments? because I can´t see that in the attribute table
@andreasalgado8244
@andreasalgado8244 Жыл бұрын
I mean the area of them
@HansvanderKwast
@HansvanderKwast Жыл бұрын
You can use the areaarea tool from the PCRaster Tools plugin or convert the raster layer to polygon vector and calculate $area in the attribute table.
@mlmichel98
@mlmichel98 2 ай бұрын
Polygonize (raster to vector) - makes subcatchments into a shp file to use in civil 3d after final step
@user-uk7gj5gf8c
@user-uk7gj5gf8c 3 жыл бұрын
Please I have a problem with fill it not function en my computer how can resolve the problem
@brolimrkz
@brolimrkz 10 күн бұрын
must clip the sea area?
@HansvanderKwast
@HansvanderKwast 10 күн бұрын
Always good to mask water bodies.
@zainabmansoor462
@zainabmansoor462 2 жыл бұрын
it is not work there is an AttributeError: 'str' object has no attribute 'crs' in the lookup, please answer me, for my senior project
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
There's a bug with the lookup tool. We'll fix it in the next release. Meanwhile you can use other tools in QGIS that doe the same (for example reclassify by table). Or use the lookup tool from the Resource Sharing repository for PCRaster.
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
Also note that the output is created, but not loaded in QGIS. You can drag it from the browser panel to the Map canvas and continue the procedure with the reclassified layer.
@zainabmansoor462
@zainabmansoor462 2 жыл бұрын
@@HansvanderKwast Thank you veryy much. I am sorry for bothering you. But there is an AssertionError in the downstream. I have searched about it and found nothing. Would you please tell me if I can solve it? Thank you again.
@HansvanderKwast
@HansvanderKwast 2 жыл бұрын
@@zainabmansoor462 Please copy the error and paste it here so I can check.
@zainabmansoor462
@zainabmansoor462 2 жыл бұрын
@@HansvanderKwast Traceback (most recent call last): File "C:\Users/zainab/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pcraster_tools\processing\algorithms\pcraster_downstream_algorithm.py", line 101, in processAlgorithm self.set_output_crs(output_file=outputFilePath, crs=input_ldd.crs(), feedback=feedback, context=context) File "C:\Users/zainab/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pcraster_tools\processing\algorithm.py", line 69, in set_output_crs return PCRasterAlgorithm.set_output_crs_wkt(output_file, crs_wkt, context, feedback) File "C:\Users/zainab/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pcraster_tools\processing\algorithm.py", line 80, in set_output_crs_wkt assert ds AssertionError Execution failed after 0.02 seconds
Hydrological analysis with PCRaster in QGIS
11:00
Hans van der Kwast
Рет қаралды 5 М.
Stream and Catchment Delineation in QGIS 3 using GRASS tools
23:24
Hans van der Kwast
Рет қаралды 57 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 42 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 37 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 59 МЛН
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
Deriving River Network & Catchments from a DEM using QGIS
25:54
GeoDelta Labs
Рет қаралды 170 М.
Take your GIS training into the field with Mergin Maps and QGIS
1:00:58
Hans van der Kwast
Рет қаралды 2,6 М.
Burning stream network into DEM layer in QGIS
16:04
Hans van der Kwast
Рет қаралды 15 М.
Airbus "HUGE UPGRADE" on A350F Shocked Everyone! Here's Why
8:35
Exploring the New Elevation Profile Tool with Point Clouds in QGIS 3.26
8:16
Slope Analysis/Reclassify from a DEM in QGIS 3 (in degrees/percentage)
5:03
Kapil Dev Adhikari
Рет қаралды 46 М.
Stream and catchment delineation with GIS (theory)
21:13
Hans van der Kwast
Рет қаралды 30 М.
Extracting a Hydrologic Network in QGIS 3.10Using the r.stream.extract tool
13:03
Middlebury Remote Sensing
Рет қаралды 6 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 42 МЛН