Skip to content
Permalink
Browse files

[sextante] fixed problem with projections when using file inputs

  • Loading branch information
volaya committed Jul 9, 2013
1 parent 0d1ab81 commit dffbc16dfdc648b851d981da158211080852c528
Showing with 9 additions and 1 deletion.
  1. +9 −1 python/plugins/sextante/core/GeoAlgorithm.py
@@ -262,7 +262,7 @@ def resolveTemporaryOutputs(self):
SextanteUtils.setTempOutput(out, self)

def setOutputCRS(self):
layers = QGisLayers.getAllLayers()
layers = QGisLayers.getAllLayers()
for param in self.parameters:
if isinstance(param, (ParameterRaster, ParameterVector, ParameterMultipleInput)):
if param.value:
@@ -272,6 +272,14 @@ def setOutputCRS(self):
if layer.source() == inputlayer:
self.crs = layer.crs()
return
if (isinstance(param, ParameterRaster) or
(isinstance(param, ParameterMultipleInput) and param.datatype == ParameterMultipleInput.TYPE_RASTER)):
p = QgsProviderRegistry.instance().provider('gdal', inputlayer)
else:
p = QgsProviderRegistry.instance().provider('ogr', inputlayer)
if p is not None:
self.crs = p.crs()
return
qgis = QGisLayers.iface
self.crs = qgis.mapCanvas().mapRenderer().destinationCrs()

0 comments on commit dffbc16

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