Bug #5949
Output extent: default to layer extent
| Status: | Closed | Start Date: | 07/05/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | GUI | |||
| Target version: | - | |||
| Patch supplied: | No |
Description
Currently the default extent is 0,1,0,1.
Better use the layer extent as a default.
See e.g. SAGA Multilevel B-Spline Interpolation.
History
Updated by Victor Olaya 10 months ago
- Status changed from New to Resolved
solved with the new extent handling introduced in r318
Updated by Paolo Cavallini 10 months ago
Checked, now when clicking on "Use layer/canvas extent" I get:
===
"/home/paolo/.qgis//python/plugins/sextante/gui/ExtentSelectionPanel.py", line 47, in useLayerExtent
extentsDict[str(layer.name())] = layer.extent()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa4' in position 30: ordinal not in range(128)
Python version:
2.7.3rc2 (default, Apr 22 2012, 22:50:19)
[GCC 4.6.3]
QGIS version:
1.9.0-Master Master, 42aed66
===
BTW, when I click on the Resolution button, I get:
===
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputPanel.py", line 32, in showNumberInputDialog
dlg = NumberInputDialog()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 12, in init
self.setupUi()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 24, in setupUi
self.fillTree()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 49, in fillTree
layerItem.setText(0, str(layer.name()))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa4' in position 30: ordinal not in range(128)
Updated by Victor Olaya 10 months ago
It seems there is a problem with layers with non-ascii characters. should be fixed in r320
Updated by Salvatore Larosa 10 months ago
Also selecting a layer with characters non ascii from "Use extent from" combo I get:
Traceback (most recent call last):
File "/home/sam/.qgis//python/plugins/sextante/gui/ExtentSelectionPanel.py", line 114, in useLayerExtent
item = str(item)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2192' in position 3: ordinal not in range(128)
Updated by Pedro VenĂ¢ncio 10 months ago
I also got an error when choosing a raster layer, in this case on Windows (not yet tested it on Linux):
Traceback (most recent call last):
File "C:/Users/pedro/.qgis//python/plugins\sextante\gui\ExtentSelectionPanel.py", line 115, in useLayerExtent
self.setValueFromRect(extentsDict[item])
KeyError: '171_4'
Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
QGIS version:
1.8.0-Lisboa Lisboa, 6416f38
Python path: ['C:/Users/pedro/.qgis//python/plugins\\sextante', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\elevation', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/pedro/.qgis//python', 'C:/Users/pedro/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\\Program Files (x86)\\ArcGIS\\bin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\bin\\python27.zip', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\bin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', '.', '~/.qgis/python', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\imgboundary\\logic', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\imgboundary\\gui', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\imgshowhide\\logic', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\imgshowhide\\gui', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\mmqgis/forms', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\openlayersov\\logic', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\openlayersov\\gui', '/usr/share/qgis/python', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\QuickMultiAttributeEdit/forms', '/usr/share/qgis/python', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\surveytools\\tools', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\ziplayers\\logic', 'C:\\Users\\pedro\\.qgis\\python\\plugins\\ziplayers\\gui', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\python\\plugins\\fTools\\tools']
Updated by Victor Olaya 10 months ago
sorry, minor mistake. fixed in r322
Updated by Pedro VenĂ¢ncio 10 months ago
I confirm the resolution!
Thanks Victor!
Updated by Paolo Cavallini 10 months ago
I keep on getting (r322):
Traceback (most recent call last):
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputPanel.py", line 32, in showNumberInputDialog
dlg = NumberInputDialog()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 12, in init
self.setupUi()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 24, in setupUi
self.fillTree()
File "/home/paolo/.qgis//python/plugins/sextante/gui/NumberInputDialog.py", line 49, in fillTree
layerItem.setText(0, str(layer.name()))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa4' in position 30: ordinal not in range(128)
Python version:
2.7.3rc2 (default, Apr 22 2012, 22:50:19)
[GCC 4.6.3]
QGIS version:
1.9.0-Master Master, 42aed66
===
and
===
Traceback (most recent call last):
File "/home/paolo/.qgis//python/plugins/sextante/gui/ExtentSelectionPanel.py", line 47, in useLayerExtent
extentsDict[str(layer.name())] = layer.extent()
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa4' in position 30: ordinal not in range(128)
Updated by Salvatore Larosa 10 months ago
mmm...even I keep on getting:
Traceback (most recent call last):
File "/home/sam/.qgis//python/plugins/sextante/gui/ExtentSelectionPanel.py", line 114, in useLayerExtent
self.setValueFromRect(extentsDict[item])
KeyError: PyQt4.QtCore.QString(u'[Canvas]')
by clicking on [Canvas] option in combo box!
[I begin to hate seriously non-ASCII characters :-(]
Updated by Victor Olaya 10 months ago
Paolo
I do not think you are updated. The line you report was changed in 320. You can see it here
now it uses unicode instead of str (as in the code you supplied, which is from a revision < 320)
Salvatore, I also hate non-ascii characters...they are quite annoying when it comes to fix bugs... I have, however, just fixed the one you reported (r323)
Updated by Paolo Cavallini 10 months ago
Sorry, my mistake, solved very nicely. I still have problems with non-UTF8 chars, but this would deserve a different ticket:
'ascii' codec can't encode character u'\xa4' in position 56: ordinal not in range(128)
Updated by Paolo Cavallini 10 months ago
- Status changed from Resolved to Closed