Skip to content

Commit

Permalink
Change the way input dataset CRS in read, to avoid problems with file…
Browse files Browse the repository at this point in the history
… handles remaining open in QGIS after use.
  • Loading branch information
Rado Guzinski committed Jun 26, 2014
1 parent 159c155 commit 9c16ad3
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -361,17 +361,10 @@ 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)
p = dataobjects.getObjectFromUri(inputlayer)
if p is not None:
self.crs = p.crs()
p = None
return
try:
from qgis.utils import iface
Expand Down

0 comments on commit 9c16ad3

Please sign in to comment.