Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from qgis.core import QgsApplication
- from processing.core.Processing import Processing
- from processing.tools import general
- from pywps.Process import WPSProcess
- from types import StringType
- class Process(WPSProcess):
- def __init__(self):
- WPSProcess.__init__(self,
- identifier = "myalgorithm",
- title = "Title",
- version = "1",
- storeSupported = "false",
- statusSupported = "false",
- abstract = "Abstract....")
- self.result = self.addLiteralOutput(identifier = "result", title = "result", type = StringType)
- def execute(self):
- qgis = QgsApplication([], False)
- qgis.setPrefixPath("C:/Program Files/QGIS 2.18/apps/qgis", True)
- qgis.initQgis()
- # Processing.initialize()
- # general.runalg('qgis:extractnodes', 'C:/river.shp', 'C:/output.shp')
- qgis.exitQgis()
- self.result.setValue("End")
Advertisement
Add Comment
Please, Sign In to add comment