Hans van der Kwast · @hansakwast
488 followers · 155 posts · Server fosstodon.org

4.4.1 is out! It fixes a bug with qgis_process and lets you use PCRaster Tools from with . Get it from conda-forge or OSGeo4W. More info: pcraster.geo.uu.nl/posts/pcras. Thanks to all developers!

#PCRaster #qgis #r #qgisprocess

Last updated 1 year ago

Hans van der Kwast · @hansakwast
488 followers · 155 posts · Server fosstodon.org

New video: Create a raster layer with unique combinations of classes in multiple discrete rasters using .
youtu.be/1wL23YQzEWg

#qgis #PCRaster

Last updated 1 year ago

GIS OpenCourseWare · @gisocw
36 followers · 12 posts · Server fosstodon.org

This week @hansakwast is teaching MSc students the course Programming for Geospatial Hydrological Applications at @ihedelft. You can follow along for free at GIS OpenCourseWare! courses.gisopencourseware.org/

#groundwatch #ErasmusMundus #gdal #cli #python #PCRaster #PyQGIS

Last updated 1 year ago

Hans van der Kwast · @hansakwast
403 followers · 96 posts · Server fosstodon.org

New video: Install and create a environment with and . youtu.be/VgBYgk7VQWg

#mamba #python #qgis #PCRaster

Last updated 1 year ago

Hans van der Kwast · @hansakwast
341 followers · 80 posts · Server fosstodon.org

Today, I've reached 20k subscribers on my YouTube channel. Thanks to all viewers! Looking forward to produce more useful videos on and other topics. Any suggestions for videos? Https://www.youtube.com/c/hans

#qgis #PCRaster #python #qgishydro #opensource #gis

Last updated 1 year ago

North Road · @northroadgeo
204 followers · 19 posts · Server fosstodon.org

RT @hansakwast
Last week, I've presented together with @geomenke in the webinar essentials for water modelling, hosted by @awschool. . Watch it back here. youtu.be/M9hmN-szO4k

#qgis #qgishydro #PCRaster

Last updated 1 year ago

Hans van der Kwast · @hansakwast
337 followers · 78 posts · Server fosstodon.org

Last week, I've presented together with @geomenke in the webinar essentials for water modelling, hosted by the Australian Water School. . Watch it back here: youtu.be/M9hmN-szO4k

#qgis #qgishydro #PCRaster

Last updated 1 year ago

· @commonchaffinch
7 followers · 54 posts · Server qoto.org



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 github.com/jvdkwast/PCRasterTu, 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.

#tools_memo #qgis #PCRaster

Last updated 2 years ago

· @commonchaffinch
7 followers · 54 posts · Server qoto.org



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 github.com/jvdkwast/PCRasterTu, 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.

#qgis #PCRaster #tools_memo

Last updated 2 years ago

Hans van der Kwast · @hansakwast
283 followers · 56 posts · Server fosstodon.org

New video: derive the contributing area of a reservoir lake from a DEM and a dam line with using the Tools plugin. youtu.be/zdHePvhVbCw

#qgis #PCRaster #qgishydro

Last updated 2 years ago

derek karssenberg · @derekkarssenberg
42 followers · 52 posts · Server scicomm.xyz

You may know (pcraster.geo.uu.nl) a raster GIS and model building framework for forward numerical simulation. It is maintained by my group (computationalgeography.org ) at @UtrechtUniversiteit@mastodon. It has been there for almost 30 years! Models run in . Rather new is the QGIS plugin (plugins.qgis.org/plugins/pcras) Thank you @hansakwast for initiating this! Hans is the person to contact if you have questions on the plugin.

#python #PCRaster

Last updated 2 years ago

Hans van der Kwast · @hansakwast
283 followers · 56 posts · Server fosstodon.org

Register now for my workshop on hydrological analysis with in and , on August 23 at 2022 Firenze. More info: talks.osgeo.org/foss4g-2022-wo. Register for conference & workshops here: aimgroup.eventsair.com/foss4g/

#PCRaster #qgis #python #foss4g #osgeo #gis #qgishydro

Last updated 2 years ago

Hans van der Kwast · @hansakwast
283 followers · 56 posts · Server fosstodon.org

My workshop on hydrological analysis with in and is accepted for
2022 in Firenze. 2022.foss4g.org.
This playlist shows some of the things I'll cover in the workshop: youtube.com/playlist?list=PLeu

#PCRaster #qgis #python #foss4g

Last updated 2 years ago

Hans van der Kwast · @hansakwast
283 followers · 56 posts · Server fosstodon.org

I've started my own consultancy (self-employed) to deal with my GIS side activities: QWAST-GIS. Check qwast-gis.com for more info.

#gis #opensource #foss4g #osgeo #qgis #python #PCRaster

Last updated 2 years ago

Hans van der Kwast · @hansakwast
283 followers · 56 posts · Server fosstodon.org

The most important update is in Chapter 4 on stream & catchment delineation. Instead of the workflow now uses the Tools plugin, developed by Nyall Dawson
& me. jvdkwast.github.io/qgis-proces. This video explains why we switched: youtu.be/9fWQZqPjPVk

#saga #qgis #PCRaster

Last updated 2 years ago