Python processing tools in QGIS

Anyone program processing tools in Python for QGIS? I’m writing my first one and getting stuck. For example, what if I’m writing a tool that just calculates a field value or deletes a single feature from a vector layer? Do I still have to return something, and if so, what do I return? If I return something, does that mean the layer gets added again to the layers list and it thus shows up twice in the map?

Hey @whiteaker – our NCEAS colleague Rushiraj Nenuji developed a QGIS plugin for geospatial semantics and might have some thoughts on your question. He’s not part of LTER but you can reach him on the DataONE slack channel that I think you are subscribed to as well (https://slack.dataone.org).

Thanks Matt. I reached out, and as luck would have it, after being stuck for two weeks, the code works today. I didn’t change anything material, so I wonder if my data or QGIS session had been corrupted. Anyway, I started fresh today and things work fine. But it’s nice to know there are people to talk to when QGIS (or one’s incompetency with it) causes grief. Thanks!

I haven’t in a long long while, like many versions of Q ago, so I had no idea, but it is nice to know some things never change ha ha.

ITCrow

1 Like