Skip to content

Commit 843d17e

Browse files
aharfootalexbruy
authored andcommittedJun 29, 2016
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. (cherry picked from commit bb81568)
1 parent efac2f7 commit 843d17e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎python/plugins/GdalTools/tools/doProjection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, iface):
4242
self.iface = iface
4343

4444
self.setupUi(self)
45-
BaseBatchWidget.__init__(self, self.iface, "gdalwarp")
45+
BaseBatchWidget.__init__(self, self.iface, "gdal_translate")
4646

4747
self.inSelector.setType(self.inSelector.FILE)
4848

@@ -112,7 +112,7 @@ def fillDesiredSRSEdit(self):
112112
def getArguments(self):
113113
arguments = []
114114
if self.desiredSRSEdit.text():
115-
arguments.append("-t_srs")
115+
arguments.append("-a_srs")
116116
arguments.append(self.desiredSRSEdit.text())
117117
if self.batchCheck.isChecked():
118118
return arguments

0 commit comments

Comments
 (0)
Please sign in to comment.