Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] more robust CRS assignation for SAGA outputs
  • Loading branch information
volaya committed Jul 10, 2015
1 parent 368eaa2 commit 519d3dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithm212.py
Expand Up @@ -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:'):]
Expand Down
7 changes: 7 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithm213.py
Expand Up @@ -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.