Skip to content
Permalink
Browse files
Change the way input dataset CRS in read, to avoid problems with file…
… handles remaining open in QGIS after use.
  • Loading branch information
Rado Guzinski committed Jun 26, 2014
1 parent 159c155 commit 9c16ad3ad32c5408ab230687a93d5e196759fee6
Showing with 2 additions and 9 deletions.
  1. +2 −9 python/plugins/processing/core/GeoAlgorithm.py
@@ -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

0 comments on commit 9c16ad3

Please sign in to comment.