4

I developed a standalone python program that makes use of QGIS API to create .qml files from sld files. This is a small program of about 15 lines of code that imports the following modules and uses few methods such as loadSldStyle and saveNamedStyle.

from PyQt4.QtGui import *
from PyQt4.QtCore import *
from qgis.core import *

Is there any way to avoid the installation of all QGIS application and install just the necessary modules, if I want to run a standalone python program that makes use of a simple QGIS functionality?

It seems to be too much install an entire application just to use 2 or 3 functions...

2
  • What specific function of PyQGIS did you use ? .qml files are simply XML files and there are many modules in Python to process XML files, shapefiles and... without the need of QGIS
    – gene
    Apr 6, 2016 at 15:17
  • What I do in my program is to add an SLD file to a shapefile, and save the corresponding style as a .qml file. A similar one is written here gis.stackexchange.com/questions/188131/…. How would you do this without the need of QGIS?
    – Falcoa
    Apr 7, 2016 at 9:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.