44 |
44 |
]
|
45 |
45 |
)
|
46 |
46 |
|
|
47 |
self.connect(self.inputLayerCombo, SIGNAL("currentIndexChanged(int)"), self.fillSourceSRSEditDefault)
|
47 |
48 |
self.connect(self.selectInputFileButton, SIGNAL("clicked()"), self.fillInputFile)
|
48 |
49 |
self.connect(self.selectOutputFileButton, SIGNAL("clicked()"), self.fillOutputFileEdit)
|
49 |
50 |
self.connect(self.selectSourceSRSButton, SIGNAL("clicked()"), self.fillSourceSRSEdit)
|
... | ... | |
100 |
101 |
return
|
101 |
102 |
Utils.FileFilter.setLastUsedRasterFilter(lastUsedFilter)
|
102 |
103 |
|
103 |
|
# get SRS for source file if necessary and possible
|
104 |
|
self.sourceSRSEdit.setText( Utils.getRasterSRS( self, inputFile ) )
|
105 |
|
|
106 |
104 |
self.inputLayerCombo.setCurrentIndex(-1)
|
107 |
105 |
self.inputLayerCombo.setEditText(inputFile)
|
108 |
106 |
|
|
107 |
# get SRS for source file if necessary and possible
|
|
108 |
self.refreshSourceSRS()
|
|
109 |
|
109 |
110 |
def fillOutputFileEdit(self):
|
110 |
111 |
lastUsedFilter = Utils.FileFilter.lastUsedRasterFilter()
|
111 |
112 |
outputFile = Utils.FileDialog.getSaveFileName(self, self.tr( "Select the raster file to save the results to" ), Utils.FileFilter.allRastersFilter(), lastUsedFilter )
|
... | ... | |
144 |
145 |
if dialog.exec_():
|
145 |
146 |
self.sourceSRSEdit.setText(dialog.getProjection())
|
146 |
147 |
|
|
148 |
def fillSourceSRSEditDefault(self, index):
|
|
149 |
if index < 0:
|
|
150 |
return
|
|
151 |
self.refreshSourceSRS()
|
|
152 |
|
|
153 |
def refreshSourceSRS(self):
|
|
154 |
crs = Utils.getRasterSRS( self, self.getInputFileName() )
|
|
155 |
self.sourceSRSEdit.setText( crs )
|
|
156 |
self.sourceSRSCheck.setChecked( not crs.isEmpty() )
|
|
157 |
|
147 |
158 |
def fillTargetSRSEdit(self):
|
148 |
159 |
dialog = SRSDialog( "Select the target SRS" )
|
149 |
160 |
if dialog.exec_():
|
... | ... | |
164 |
175 |
arguments << "-wm"
|
165 |
176 |
arguments << str(self.cacheSpin.value())
|
166 |
177 |
if self.resizeGroupBox.isChecked():
|
167 |
|
arguments << "-ts"
|
|
178 |
arguments << "-ts"
|
168 |
179 |
arguments << str( self.widthSpin.value() )
|
169 |
180 |
arguments << str( self.heightSpin.value() )
|
170 |
181 |
if self.multithreadCheck.isChecked():
|