0

I've been trying for a while to do a reclassification on slope rasters in QGIS for Mac (QGIS version: 3.18.2-Zürich) but always get Execution Failed error. This is the second project where I just give up.

Does anyone know what the issue is?

Full log with the error message is as follows:

QGIS version: 3.18.2-Zürich QGIS code revision: 44d7dfabbe Qt version: 5.14.2 GDAL version: 3.2.1 GEOS version: 3.9.1-CAPI-1.14.2 PROJ version: Rel. 6.3.2, May 1st, 2020 PDAL version: 2.2.0 (git-version: Release) Processing algorithm… Algorithm 'r.reclass' starting… Input parameters: { 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'input' : '/Users/shane/Documents/GIS Client Work/Mapping/Danbri Farm/Danbri 1/Geography/Danbri1_Slope.tif', 'output' : 'TEMPORARY_OUTPUT', 'rules' : '', 'txtrules' : '0 thru 10 = 1\n11 thru 20 = 2\n21 thru 89 =3' }

Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 423, in processAlgorithm
getattr(self, fullName)(parameters, context, feedback)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 480, in processInputs
self.loadRasterLayerFromParameter(
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 731, in loadRasterLayerFromParameter
self.loadRasterLayer(name, layer, external, band)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 746, in loadRasterLayer
self.setSessionProjectionFromLayer(layer)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 1044, in setSessionProjectionFromLayer
self.setSessionProjection(layer.crs())
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Algorithm.py", line 1051, in setSessionProjection
file_name = Grass7Utils.exportCrsWktToFile(crs)
File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/grass7/Grass7Utils.py", line 95, in exportCrsWktToFile
f.write(wkt)
UnicodeEncodeError: 'ascii' codec can't encode character '\xb0' in position 904: ordinal not in range(128)
Execution failed after 0.08 seconds

Loading resulting layers Algorithm 'r.reclass' finished

[NOTE: I noticed that I get the same error message when I run another GRASS tool 'r.neighbor']

Here is a screenshot of what I'm inputting / working with. enter image description here

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
  • Could be a problem with the path to your input file. I noticed, that it contains spaces, which can cause problems in certain circumstances. Could you try copying the input file directly to /Users/shane/Documents and rerun the tool? – C.-F. Vintar Jul 08 '21 at 04:07
  • Hey, thanks for responding. I tried that but got another error. – ActionEcologist Jul 08 '21 at 04:56
  • Is it the same error? If not, please add it as a comment or edit your original post. Also: Have you tried saving into an output file on your harddisk instead of a temporary file? Sometimes that helps. – C.-F. Vintar Jul 08 '21 at 05:00
  • Error is identical when moving the source tif to documents folder.. (also when I try saving to file). – ActionEcologist Jul 08 '21 at 05:17
  • Could you provide a sample of the your input data? – C.-F. Vintar Jul 08 '21 at 05:21
  • I've attached a screenshot, does that help? – ActionEcologist Jul 08 '21 at 05:28
  • 1
    No, I meant a link to a small part of your dataset, so that one could have a look on how the data a structured. The error messages hints, that some character can't be read. If an access to the dataset is not possible, please provide some information about the data (data type, unit, size etc. from the layer properties). – C.-F. Vintar Jul 08 '21 at 05:36
  • The data itself is a 'Slope' tif layer that QGIS generated from the DSM (it's 239MB). This also happened to me on a previous project as well. The only thing in common is that both slope maps were derived from DSM TIFFs outputted from Open Drone Map but otherwise completely different. – ActionEcologist Jul 08 '21 at 05:43
  • Data type : Float32 - Thirty two bit floating point. Unit: meters. Size: 9354 x 7444.
    CRS: EPSG:32760 - WGS 84 / UTM zone 60S - Projected. Extent: 255422.9899999999906868,6002321.0299999993294477 : 256545.4700000000302680,6003214.3099999995902181
    – ActionEcologist Jul 08 '21 at 05:44
  • Tough one...My last idea would be to enter values into the parameters Cellsize and Region, for some reason it sometimes causes trouble, if you leave these empty. But that doesn't really fit the error message. Apart from that, I don't see anything that could be wrong. – C.-F. Vintar Jul 08 '21 at 05:57
  • So I can use a vector (property boundary) as the extent, but what would I change the cell size to if I wanted to experiment with that? – ActionEcologist Jul 08 '21 at 06:02
  • You should be able to use any layer to define the Region, since it only takes this layers extent. You can also use the map canvas extent or draw an extent yourself. The cell size can vary, but I would try the cellsize of the input first. – C.-F. Vintar Jul 08 '21 at 06:04
  • Is pixel size the same as cell size in this instance? I'm not sure what that refers to. It's clearly not area (as that is extent) ...is it the geographic distance of one raster cell? I checked.. that's 0.12m – ActionEcologist Jul 08 '21 at 06:06
  • Cellsize is the length of one of your pixels in the unit of your coordinate reference system. Should be 0.12 in your case. – C.-F. Vintar Jul 08 '21 at 06:18
  • Thanks for confirming. So I ran that and got exactly the same error message.. [sigh]. What is going on? Its driving me nuts! ;) I also tried this on my laptop using a different version of QGIS (same TIFF file) and got the same error. It's bizarre. – ActionEcologist Jul 08 '21 at 06:21
  • Ok. Last idea: Have you tried a different Operation System? Maybe in a VM. Also, I would try with the LTS version of QGIS, which is currently 3.16, if I am not mistaken. – C.-F. Vintar Jul 08 '21 at 06:24
  • Yes I tried the LTS version on a different computer - same error. I haven't tried in Windows, but (out of curiosity) I tried a different DEM from another project (this one produced by government via LiDAR) and it didn't work but for completely different reasons (unable to load GDAL library in this case). Maybe there's something about the data it doesn't like? I don't know – ActionEcologist Jul 08 '21 at 06:31
  • [Interestingly, I tried running the reclassification (of the same slope TIFF) in Arc Map, and it also returned an error - but I'm not very experienced in Arc so there's a chance it's me!] – ActionEcologist Jul 08 '21 at 06:40

0 Answers0