#PCRaster 4.4.1 is out! It fixes a bug with qgis_process and lets you use #QGIS PCRaster Tools from #R with #qgisprocess. Get it from conda-forge or OSGeo4W. More info: https://pcraster.geo.uu.nl/posts/pcraster-441-released/. Thanks to all developers!
#PCRaster #qgis #r #qgisprocess
New video: Create a raster layer with unique combinations of classes in multiple discrete rasters using #QGIS. #PCRaster
https://youtu.be/1wL23YQzEWg
This week @hansakwast is teaching #GroundwatCh #ErasmusMundus MSc students the course Programming for Geospatial Hydrological Applications at @ihedelft. You can follow along for free at GIS OpenCourseWare! #GDAL #CLI #Python #PCRaster #PyQGIS https://courses.gisopencourseware.org/
#groundwatch #ErasmusMundus #gdal #cli #python #PCRaster #PyQGIS
Today, I've reached 20k subscribers on my YouTube channel. Thanks to all viewers! Looking forward to produce more useful videos on #qgis #pcraster #python #qgishydro and other #opensource #gis topics. Any suggestions for videos? Https://www.youtube.com/c/hansvanderkwast
#qgis #PCRaster #python #qgishydro #opensource #gis
RT @hansakwast
Last week, I've presented together with @geomenke in the webinar #QGIS essentials for water modelling, hosted by @awschool. #QGISHydro #PCRaster. Watch it back here. https://youtu.be/M9hmN-szO4k
Last week, I've presented together with @geomenke in the webinar #QGIS essentials for water modelling, hosted by the Australian Water School. #QGISHydro #PCRaster. Watch it back here: https://youtu.be/M9hmN-szO4k
In the past couple days, I had to delineate a watershed using the PCRaster tool for some hydrological modeling work. Despite the excellent tutorial of https://github.com/jvdkwast/PCRasterTutorials/tree/main/PCRasterCatchmentDelineation, there were several pitfalls that took me a long while to figure out.
The first is, how do I know what x-y coordinates to put into “location.txt”? I only know the latitude and longitude of my stream gauge, but they did not work when I tried putting them in. It turns out the x-y coordinates are the coordinates of this stream gauge in the projected coordinate system of the flow direction (ldd) map. As such, the easiest way to approach the problem seems to be to use the QGIS PCRaster plugin. First, import the digital elevation map into QGIS, reproject it into a projected coordinate system, and set the layer’s coordinate system to be the same as the digital elevation map. Second, calculate the ldd map using the PCRaster plugin’s lddcreate
command, so that the ldd map has the same projected coordinate system. Third, load the text file containing the lat-lon of the stream gauge as a map layer. QGIS automatically does the conversion, so that the gauge is shown in its correct position in the projected coordinate system. Fourth, calculate the stream order from the ldd map using the PCRaster plugin’s streamorder
command and check if the gauge is actually located in the correct stream. This is important because the lat-lon coordinates and the digital elevation maps are not entirely accurate, often causing the gauge to be outside the stream implied by the ldd map. If the gauge is outside, find the nearest in-stream pixel that seems to make sense. Placing the curser on top of the nearest in-stream pixel finally makes QGIS show the desired x-y coordinates in its status bar.
The second is, how to install the PCRaster plugin in QGIS? The plugin does not work on its own. Instead, one must install PCRaster in the same Python environment as QGIS accesses. In the end, I had to create a new conda environment and install PCRaster and QGIS both from the conda-forge
channel. Moreover, the default conda create -n
command now pulls Python 3.11, but this Python version does not support compatible PCRaster and QGIS releases. I set the Python version to 3.9 to finally make things work.
The third is, why is my delineated catchment area incorrect? My stream gauge is on a major river so I know it must cover a large catchment area. Yet I got a zero-sized catchment at my first try. It turned out that in running the lddcreate
command in PCRaster plugin, one must remove pits - pixels that draw flow from all directions and do not let water flow out - that do not make sense. One can set thresholds in the “Outflow depth”, “Core area”, “Core volume”, and “Catchment precipitation” in the options of the lddcreate
command to remove pits that are too shallow or too small. The default thresholds were too small for me, and as a result, the pits broke up my major river into many small ones in the stream order map created from the ldd map. After I set the Core area to be five times the default 9999999 (map units, for me it was meters), my delineated catchment finally made sense.
In the past couple days, I had to delineate a watershed using the PCRaster tool for some hydrological modeling work. Despite the excellent tutorial of https://github.com/jvdkwast/PCRasterTutorials/tree/main/PCRasterCatchmentDelineation, there were several pitfalls that took me a long while to figure out.
The first is, how do I know what x-y coordinates to put into “location.txt”? I only know the latitude and longitude of my stream gauge, but they did not work when I tried putting them in. It turns out the x-y coordinates are the coordinates of this stream gauge in the projected coordinate system of the flow direction (ldd) map. As such, the easiest way to approach the problem seems to be to use the QGIS PCRaster plugin. First, import the digital elevation map into QGIS, reproject it into a projected coordinate system, and set the layer’s coordinate system to be the same as the digital elevation map. Second, calculate the ldd map using the PCRaster plugin’s lddcreate
command, so that the ldd map has the same projected coordinate system. Third, load the text file containing the lat-lon of the stream gauge as a map layer. QGIS automatically does the conversion, so that the gauge is shown in its correct position in the projected coordinate system. Fourth, calculate the stream order from the ldd map using the PCRaster plugin’s streamorder
command and check if the gauge is actually located in the correct stream. This is important because the lat-lon coordinates and the digital elevation maps are not entirely accurate, often causing the gauge to be outside the stream implied by the ldd map. If the gauge is outside, find the nearest in-stream pixel that seems to make sense. Placing the curser on top of the nearest in-stream pixel finally makes QGIS show the desired x-y coordinates in its status bar.
The second is, how to install the PCRaster plugin in QGIS? The plugin does not work on its own. Instead, one must install PCRaster in the same Python environment as QGIS accesses. In the end, I had to create a new conda environment and install PCRaster and QGIS both from the conda-forge
channel. Moreover, the default conda create -n
command now pulls Python 3.11, but this Python version does not support compatible PCRaster and QGIS releases. I set the Python version to 3.9 to finally make things work.
The third is, why is my delineated catchment area incorrect? My stream gauge is on a major river so I know it must cover a large catchment area. Yet I got a zero-sized catchment at my first try. It turned out that in running the lddcreate
command in PCRaster plugin, one must remove pits - pixels that draw flow from all directions and do not let water flow out - that do not make sense. One can set thresholds in the “Outflow depth”, “Core area”, “Core volume”, and “Catchment precipitation” in the options of the lddcreate
command to remove pits that are too shallow or too small. The default thresholds were too small for me, and as a result, the pits broke up my major river into many small ones in the stream order map created from the ldd map. After I set the Core area to be five times the default 9999999 (map units, for me it was meters), my delineated catchment finally made sense.
New video: derive the contributing area of a reservoir lake from a DEM and a dam line with #QGIS using the #PCRaster Tools plugin. #QGISHydro https://youtu.be/zdHePvhVbCw
You may know #PCRaster (https://pcraster.geo.uu.nl) a raster GIS and model building framework for forward numerical simulation. It is maintained by my group (https://www.computationalgeography.org ) at @UtrechtUniversiteit@mastodon. It has been there for almost 30 years! Models run in #python. Rather new is the QGIS plugin (https://plugins.qgis.org/plugins/pcraster_tools/) Thank you @hansakwast for initiating this! Hans is the person to contact if you have questions on the plugin.
Register now for my workshop on hydrological analysis with #PCRaster in #QGIS and #Python, on August 23 at #FOSS4G 2022 Firenze. More info: https://talks.osgeo.org/foss4g-2022-workshops/talk/NSJMXC/?s=09. Register for conference & workshops here: https://aimgroup.eventsair.com/foss4g/registration/Site/Register?s=09 #OSGeo #GIS #QGISHydro
#PCRaster #qgis #python #foss4g #osgeo #gis #qgishydro
My workshop on hydrological analysis with #PCRaster in #QGIS and #Python is accepted for
#FOSS4G 2022 in Firenze. https://2022.foss4g.org.
This playlist shows some of the things I'll cover in the workshop: https://youtube.com/playlist?list=PLeuKJkIxCDj2xbV45C45wz3N89FvmTuSu
#PCRaster #qgis #python #foss4g
I've started my own #gis consultancy (self-employed) to deal with my #opensource GIS side activities: QWAST-GIS. Check http://www.qwast-gis.com for more info. #foss4g #osgeo #QGIS #Python #PCRaster
#gis #opensource #foss4g #osgeo #qgis #python #PCRaster
The most important update is in Chapter 4 on stream & catchment delineation. Instead of #SAGA the workflow now uses the #QGIS #PCRaster Tools plugin, developed by Nyall Dawson
& me. https://jvdkwast.github.io/qgis-processing-pcraster/. This video explains why we switched: https://youtu.be/9fWQZqPjPVk