QGIS Python (PyQGIS) - Create a Custom Processing Script for QGIS in the Processing Toolbox

  Рет қаралды 34,657

Geospatial School

Geospatial School

4 жыл бұрын

Learn to create custom Python scripts that you can run in QGIS. Python scripts will automatically be added to the QGIS Processing Toolbox. This video tutorial gives and example of how to load a vector layer as a source and change the layer's symbology.
PyQGIS online course: opensourceoptions.com/courses...
Sign-up for OSO email newsletter: mailchi.mp/64ce20a56156/ososu...

Пікірлер: 19
@ryanmcgowan3061
@ryanmcgowan3061 3 жыл бұрын
This video should be the defacto video for creating QGIS scripts. Pretty much any scripting in QGIS is going to need a UI and the ability to reuse code. Most other videos show you how to do 2+2 in the Python console, and that's not practical when you need to solve a real problem, and re-use it.
@geospatialschool
@geospatialschool 3 жыл бұрын
Thanks! Glad it's helpful
@RobertoEMou
@RobertoEMou Жыл бұрын
Hey! Great tutorial! I am trying to do my first template but have input 2 be a raster
@kiyomiholman4051
@kiyomiholman4051 3 жыл бұрын
This is great! Do you know if it's possible to add widgets to the processing provider option? Like if I wanted to add a drop down menu that was populated with the fields of an input shapefile, or produce a plot as an output as well as the mapped output? Also you mention in the video that you have another video on how to add processing algorithms within this processing algorithm, I was just curious which video that is. Thanks for the terrific introduction to this method of plugin building!
@geospatialschool
@geospatialschool 3 жыл бұрын
To add that much functionality you're probably best off to develop a plugin. I have some videos on that, and a course with code and data at opensourceoptions.com
@kiyomiholman4051
@kiyomiholman4051 3 жыл бұрын
@@geospatialschool Ah nuts! I have already developed my plugin, it was just for 2.18 and I wanted to upgrade it to look nicer and a bit more user friendly - this seemed like a tidy solution haha. I'll have to fiddle with it all again! Thanks for the prompt reply at any rate, your videos are terrific.
@paytonseats4670
@paytonseats4670 3 жыл бұрын
Hey! Thanks for the great video! My coding background is in MATLAB but I'm using QGIS/py for a research project. I'm trying to write a script to output the search radius for Hotspot (kernel density) algorithm to Silverman's rule of thumb bandwidth with is a simple expression based on raster cell number, IQR, and std.dev. How should I go about declaring classes when my inputs/outputs are scalars rather than spatial files? Matlab's class declaration is "under the hood" so to speak so I'm starting from square one. Thanks!
@geospatialschool
@geospatialschool 3 жыл бұрын
I would start by using GDAL or rasterio to read in your raster files as numpy arrays, then perform your operations on the numpy array. This will be similar to matlab and you can create a basic script (with no classes to start). I think that will be easier than trying to develop a class structure for a QGIS-specific script. If you do want to make it a QGIS script in the future you can adapt your code later.
@LEO_2822
@LEO_2822 2 жыл бұрын
Hello man, I loved your video but want to know that can we convert processing toolbox to py plugin??
@sadiemoland2157
@sadiemoland2157 3 жыл бұрын
You mention that if we're interested in using a processing algorithm within a script to check out your other video. Which video is that? I can't seem to find it.
@geospatialschool
@geospatialschool 3 жыл бұрын
This video: kzbin.info/www/bejne/h3qql6qka86UrpY
@marklexus27
@marklexus27 11 ай бұрын
So what's the difference with the Geoprocessing tools?
@j.r.3049
@j.r.3049 3 жыл бұрын
Is it possible to completely automate the generation of QGIS-Projects. Like having a folder for each project with properly formatized CSV-Files and a background layer, which are then imported to QGIS and saved as Project file with a python loop? I was asked to do research on that but unfortunately I dont have any QGIS/ Python skills worth mentioning.
@geospatialschool
@geospatialschool 3 жыл бұрын
You should be able to do this. See this post to get started with saving project files: gis.stackexchange.com/questions/256790/saving-qgis-project-file-qgs-with-pyqgis. I have other videos that show how to import layers to QGIS. For a detailed course with data a code to get you started with PyQGIS, check out my website: opensourceoptions.com/courses/courses/pyqgis-learn-the-qgis-python-api/
@ilanabensignor3488
@ilanabensignor3488 3 жыл бұрын
Hello, does the course can be helpful in order to develop a script that can do maps from large databases ? spatial joins need to be done in order to do emissions maps with the help of a code
@ilanabensignor3488
@ilanabensignor3488 3 жыл бұрын
Like the user must be able to select specific characteristics and get it on a map
@geospatialschool
@geospatialschool 3 жыл бұрын
You can check out the course content and see some sample lessons on the course page: opensourceoptions.com/course/pyqgis-learn-the-qgis-python-api/
@danielbasiliomail
@danielbasiliomail 3 жыл бұрын
can you edit a script to me? a can pay for it, look azimuth and calculator plugin
@danielbasiliomail
@danielbasiliomail 3 жыл бұрын
Hi. What's your email?
QGIS Python Tutorial (PyQGIS Tutorial)
32:58
Geospatial School
Рет қаралды 35 М.
qgis automation
31:58
Geoinformatics
Рет қаралды 3,7 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
Я обещал подарить ему самокат!
01:00
Vlad Samokatchik
Рет қаралды 9 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 176 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 253 М.
QGIS Python - Use Processing Tools in a Python Script
7:23
Geospatial School
Рет қаралды 24 М.
QGis tutorial - Plugin development - part 1
9:22
Rob
Рет қаралды 28 М.
Georeferencing Drone Imagery in QGIS
12:50
Karen Joyce
Рет қаралды 22 М.
AUTOMATICALLY DIGITIZE map features in QGIS with this PLUGIN
7:52
Geospatial School
Рет қаралды 4 М.
A Tour of QGIS Processing Toolbox Algorithms
22:00
QGIS North America
Рет қаралды 7 М.
Yanlışlıkla Telefonumu Parçaladım!😱
0:18
Safak Novruz
Рет қаралды 985 М.
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 682 М.
Ускоряем ваш TV🚀
0:44
ARTEM_CHIBA
Рет қаралды 331 М.
Это - iPhone 16!
16:29
Rozetked
Рет қаралды 430 М.
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 8 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,8 МЛН