0

I would like to write a Python script in QGIS and would like to use functions from a plugin. For example, QuickOSM plugin has an import function and an "Open" button, that creates a temporary file in QGIS with the result of importing the osm file. I would like my script to perform the same for more files within a folder. I would also like the script to add a new field in the resulting file with the name of the file. How can I do that?

asked Jul 10, 2020 at 8:53

1 Answer 1

1

You may use the available QGIS processing algorithms included in QuickOSM plugin e.g https://github.com/ThomasG77/QuickOSM/blob/update-processing-docs/doc/readme.md (Done a PR but not merged at the moment)

You may look at https://docs.qgis.org/testing/en/docs/user_manual/processing/console.html#calling-algorithms-from-the-python-console to understand how to call the algorithms from PyQGIS

By combining both resources, you should be able to achieve what you asked for. The part about adding a new field can be managed separately from calling the Quick OSM processing algorithms.

answered Jul 10, 2020 at 16:31

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.