Skip to content
Permalink
Browse files

[processing] more robust CRS assignation for SAGA outputs

  • Loading branch information
volaya committed Jul 10, 2015
1 parent 368eaa2 commit 519d3dc3b769e8aa6b0d849f4c58521833a90816
@@ -242,6 +242,13 @@ def processAlgorithm(self, progress):
ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
SagaUtils.executeSaga(progress)

if self.crs is not None:
for out in self.outputs:
if isinstance(out, (OutputVector, OutputRaster)):
prjFile = os.path.splitext(out.getCompatibleFileName(self))[0] + ".prj"
with open(prjFile, "w") as f:
f.write(self.crs.toWkt())


def preProcessInputs(self):
name = self.commandLineName().replace('.', '_')[len('saga:'):]
@@ -194,4 +194,11 @@ def processAlgorithm(self, progress):
ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
SagaUtils.executeSaga(progress)

if self.crs is not None:
for out in self.outputs:
if isinstance(out, (OutputVector, OutputRaster)):
prjFile = os.path.splitext(out.getCompatibleFileName(self))[0] + ".prj"
with open(prjFile, "w") as f:
f.write(self.crs.toWkt())


0 comments on commit 519d3dc

Please sign in to comment.
You can’t perform that action at this time.