Skip to content

Commit

Permalink
Fix bug in GDALTools Assign Projection
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aharfoot authored Jun 24, 2016
1 parent 02a0ebe commit bb81568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/doProjection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, iface):
self.iface = iface

self.setupUi(self)
BaseBatchWidget.__init__(self, self.iface, "gdalwarp")
BaseBatchWidget.__init__(self, self.iface, "gdal_translate")

self.inSelector.setType(self.inSelector.FILE)

Expand Down Expand Up @@ -112,7 +112,7 @@ def fillDesiredSRSEdit(self):
def getArguments(self):
arguments = []
if self.desiredSRSEdit.text():
arguments.append("-t_srs")
arguments.append("-a_srs")
arguments.append(self.desiredSRSEdit.text())
if self.batchCheck.isChecked():
return arguments
Expand Down

0 comments on commit bb81568

Please sign in to comment.