- changed status to resolved
[Cursor Location Value panel] handle "Can not transform from <crs1> to <crs2> on QgsPointXY..." exception
Issue #1221
resolved
A transformation from one CRS to another CRS is not always possible.
In that case, the get’s no feedback in the GUI.
In the console you see an error:
Can not transform from WGS 84 / UTM zone 33N to Ammassalik 1958 / Greenland zone 7 east on QgsPointXY <QgsPointXY: POINT(385810.41852719057351351 5814548.55609894078224897)>
forward transform of
(inf, inf)
Error: Fallback transform failed
Traceback (most recent call last):
File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 1371, in <lambda>
lambda crs, pt, c=canvas: self.setCurrentLocation(SpatialPoint(crs, pt), canvas)
File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 1801, in setCurrentLocation
self.loadCursorLocationValueInfo(spatialPoint, mapCanvas)
File "D:\source\QGISPlugIns\enmap-box\enmapbox\gui\enmapboxgui.py", line 967, in loadCursorLocationValueInfo
self.ui.cursorLocationValuePanel.loadCursorLocation(spatialPoint, mapCanvas)
File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\cursorlocationvalue.py", line 398, in loadCursorLocation
self.setCursorLocation(point)
File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\cursorlocationvalue.py", line 543, in setCursorLocation
self.updateCursorLocationInfo()
File "D:\source\QGISPlugIns\enmap-box\enmapbox\qgispluginsupport\qps\cursorlocationvalue.py", line 550, in updateCursorLocationInfo
self.tbX.setText('{}'.format(pt.x()))
AttributeError: 'NoneType' object has no attribute 'x'
How to reproduce:
- display enmap_berlin.bsq
- set EPSG: 2296 as Cursor Location Values CRS
- click a location
Comments (1)
-
- Log in to comment
cursorlocationvalue.py widget handles faild CRS conversion, resolves
#1221Signed-off-by: jakimowb benjamin.jakimow@geo.hu-berlin.de
→ <<cset 7c5f5d5dbde8>>