mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Fix bug in GDALTools Assign Projection
Assign Projection uses gdalwarp, and this works correctly when a raster has no CRS assigned, however, in the case of a raster with an incorrect CRS assignment, then gdalwarp will reproject the raster instead of simply changing the assigned CRS, propagating the error. Switching the Assign Projection tool to use gdal_translate provides the intended behaviour in all situations.
This commit is contained in:
parent
02a0ebe1cf
commit
bb81568362
@ -42,7 +42,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget):
|
|||||||
self.iface = iface
|
self.iface = iface
|
||||||
|
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
BaseBatchWidget.__init__(self, self.iface, "gdalwarp")
|
BaseBatchWidget.__init__(self, self.iface, "gdal_translate")
|
||||||
|
|
||||||
self.inSelector.setType(self.inSelector.FILE)
|
self.inSelector.setType(self.inSelector.FILE)
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BaseBatchWidget):
|
|||||||
def getArguments(self):
|
def getArguments(self):
|
||||||
arguments = []
|
arguments = []
|
||||||
if self.desiredSRSEdit.text():
|
if self.desiredSRSEdit.text():
|
||||||
arguments.append("-t_srs")
|
arguments.append("-a_srs")
|
||||||
arguments.append(self.desiredSRSEdit.text())
|
arguments.append(self.desiredSRSEdit.text())
|
||||||
if self.batchCheck.isChecked():
|
if self.batchCheck.isChecked():
|
||||||
return arguments
|
return arguments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user