QGIS Process Command

Jul 15, 2021 | FOSS4G, QGIS

I’m wrapping up the 2nd QGIS Class and have been digging hard into the python/scripting/programming side of QGIS. A programmer I am not and usually I have to pick some sort of path into the software that makes sense to me. Scripting has been coming up more and more as I dive back into the TN 911 Project.

I discovered something that’s been around for the last bit in qgis and I no doubt read the release notes on it……….and immediately forgot about it: qgis_process. You have a command line way to access QGIS Processing tools. My examples will be Linux oriented but it works on <fill in the blank>. Open a shell window and type qgis_process:

If I want a list of tools at my disposal: qgis_process list

If I want to know about a tool in particular: qgis_process help qgis:buffer

What if you want to run a command:

qgis_process run qgis:buffer –INPUT=parks_2274.shp DISTANCE=5000 –OUTPUT=parks_buffer.shp

….and if I check the output using QGIS:

Of course I did it all using shapefiles – I’ve got all the output file types I need at my disposal.

The nice thing is I have this uncomplicated way to access the processing tools and running them. Granted this isn’t Python but still – a command line way to access what you want to access. You could set up a very uncomplicated process to: Buffer -> Clip -> Merge -> Whatever you want without cracking open the desktop.

This points out two problems in my life:

  • Generally just keeping up. QGIS is an exciting side of life for me and one I enjoy. I really enjoy this because I started my life on the desktop with analysis and data cleanup. I’ll most likely end my career still enjoying that side of life – oh yeah Desktop GIS is dead I forgot.
  • Running a business is everything BUT the technical bells and whistles I enjoy. I need to make more time for that even if I have to block off a Friday morning for 2 hours and just buffer parks for no reason.

You may also like

QGIS US User Group

QGIS US User Group

I've been too busy to write anything as of late. I have a lot to talk about - just not much time to do it. So FOSS4GNA happened on Sept 9-11 2024. Probably the biggest thing for me during the conference was we had two BOFs on QGIS. Granted - I think it was supposed to...

QGIS and LIDAR

So this will be my last "New Class" announcement for a bit. Back in the spring of 2024, I taught a 4 hour QGIS and LIDAR class at the TNGIC meeting (State of TN GIS meeting). I ran through it and shelved it and now I'm fixing the problem spots and smoothing down the...

NENA 911 Database in QGIS

NENA 911 Database in QGIS

I work with two counties in TN with the TN NG911 standard. Flash back 10 years ago and I hadn't really grasped how complicated address is. Do I like it? Mostly Yes. Occasionally I get questions from outside TN and I demo the two counties and how that works. A while...