I am trying to perform a viewshed analysis in QGIS using a DSM raster file and a .shp file containing information on CCTV cameras. Example below:
Camera loc, Easting, Northing,
Montpellier Station 359205 174540
Cheltenham Road, Station Road 358930 174586
Cheltenham Road, Zetland Road 358870 174734
Stapleton Road, Warwick Road 360634 174391
Rawnsley House, Lift #2 360341 173998
Rawnsley House, Main entrance (external) 360341 173998
Rawnsley House, Car park 360341 173998
Rawnsley House, Lift lobby 360341 173998
Rawnsley House, Left front (External PTZ) 360341 173998
Lower Ashley Road/Milpond Street 360375 174247
Wills Drive, Door panel 360409 173822
Twinnel House, Rear right (External PTZ) 360419 173813
Python, however, produces this error message:
Traceback (most recent call last):
File "C:/Users/Lucas/.qgis2/python/plugins\ViewshedAnalysis\viewshedanalysis.py", line 161, in run
outPath = ViewshedAnalysisDialog.returnOutputFile(self.dlg)
File "C:/Users/Lucas/.qgis2/python/plugins\ViewshedAnalysis\viewshedanalysisdialog.py", line 60, in returnOutputFile
return str(l)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 55: ordinal not in range(128)
I tried to solve the problem as Mickaël Bucas suggested. But since I have no clue about how to deal with python (I'm familiar with R though, if this helps) and don't know how transfer other solutions to my problem... can someone explain in a not-too-technical way how to solve this? I see that is has something to do with the encoding. The shp file is encoded in UTF-8. At least this was specified when I imported them to QGIS. Also I want to avoid
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
(see this post)
Thanks!