mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Change the way input dataset CRS in read, to avoid problems with file handles remaining open in QGIS after use.
This commit is contained in:
parent
159c1555f9
commit
9c16ad3ad3
@ -361,17 +361,10 @@ class GeoAlgorithm:
|
|||||||
if layer.source() == inputlayer:
|
if layer.source() == inputlayer:
|
||||||
self.crs = layer.crs()
|
self.crs = layer.crs()
|
||||||
return
|
return
|
||||||
if isinstance(param, ParameterRaster) \
|
p = dataobjects.getObjectFromUri(inputlayer)
|
||||||
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:
|
if p is not None:
|
||||||
self.crs = p.crs()
|
self.crs = p.crs()
|
||||||
|
p = None
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user