Workflow Automation using QGIS Model Designer - Advanced QGIS
Вставка
- Опубліковано 20 вер 2024
- This video is part of our Advanced QGIS course.
Access the full course material at courses.spatia...
Access the content covered in the video at courses.spatia...
Note: Certification and Support are only available for participants in our paid instructor-led classes.
Great video and really enjoying these 30 days of QGIS!
Thank you
Thank you for the tutorial.
This is insightful. I was looking for the 'auto arrange' tool to organize the elements in the model. Perhaps it's not yet implemented in QGIS, but it would be a nice addition.
It's there. In the Model Designer, select the elements and then use Edit -> Snap Selected Components to Grid
For the model input, is there a way to provide the user with a drop down list for a layer's unique field values? I was hoping to take this user input and pass it along to an expression, so if it is possible to get the field values, how could I access them in an expression?
Use the 'Vector Field' input which allows to specify a parent layer. It will be populated with fields of the parent layer chosen by the user. The chosen field is available as a variable in the Expression editor in the model and can be used in any expression.
hey, there seems to be errors. when you count points in polygon, you didnot choose the one reprojected.
The workflow runs fine and gives the correct results for me. If you are referring to the 'Input Points' layer when counting points in polygon, that algorithm works with layers in different projections and internally does the reprojection to count the correct number of points within the input polygons. Many algorithms expect the layers in the same projection, so for them, you wil have to reproject the layers so their projections match.
Any solution why sometimes batch_processing stops middway and there is no other way other than force quit QGIS and redo the steps again?
Thank you for the course and tutorial, much appreciated.
QGIS version 3.34.4
If you see this happening consistently, try with a new profile. Settings -> User Profile -> New Profile. That usually solves unexplained behaviors like these. Also make sure the outputs are not going to a network drive (in Windows usually the Desktop/ etc. are on OneDrive) which can cause bottlenecks.
@@SpatialThoughts Thank you! Will try it next time
I was using graphical model with some vector data and i am wondering if there is an easier way of cuttling a line using point shapefiles. I used network plugin and saga tools before. Is it possible to do it using native Qgis tools or expressions in model?
Yes. The idea is to create a line at each point using 'Geometry by Expression' algorithm and then use 'Split by Lines' algorithm to split the lines using the newly generated line layer. gis.stackexchange.com/questions/413117/splitting-line-with-point-layer-in-qgis
Do you know if there is anyway in a model to automatically name the outputs based on the input layers. I see now you could do it using the batch process, but would still be nice to configure it in the model for individual runs.
Yes. Add one more step in the model using the algorithm 'Load Layer into Project' and for the loaded layer name, use Pre-calculated value with an expression that uses the input layer. For example, you can use the expression 'aggregated_' || @gridsize to name the layer with the chosen grid size.
@@SpatialThoughts Thanks, that works great, I've been trying to find that for years. Need to update all my models now.
Pirates are loose just of Florida 😂