27

Is there a way to access QGIS plugins in Python?

I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road graph plugin. The latter is probably a different can of worms because it is a C++ rather than Python plugin.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jun 18, 2011 at 3:35

1 Answer 1

21

If you know the python module for the plugin you can just run a import in the python console For example:

from fTools import somemodule

Then you can do somemodule.methodcall(). You will have to make sure, by looking at the code of the plugin, that it doesn't rely on any of it gui stuff. Otherwise you might get a nice UI pop up when you don't want it.

But yes it's possible.

answered Jun 18, 2011 at 8:33
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.