mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] more robust CRS assignation for SAGA outputs
This commit is contained in:
parent
368eaa258b
commit
519d3dc3b7
@ -242,6 +242,13 @@ class SagaAlgorithm212(GeoAlgorithm):
|
||||
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 @@ class SagaAlgorithm213(SagaAlgorithm212):
|
||||
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())
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user