I get the same error that Juan gets, both with his commands and with those in the example in the manual page (and both in grass76 and trunk).
[omitting the rest for brevity] r.width.funct map=dist2out image=/tmp/my_basin 100% Tot. cells 88407.0 Tot. area 8840700.0 Max distance 7714.591101 Traceback (most recent call last): File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 135, in <module> sys.exit(main()) File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 84, in main prc[0,0] , prc[0,1] = findint(kl,0.05) , 0.05 File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 128, in findint z1, z2, f1, f2 = kl[int(Xf[0])][0], kl[int(Xf[0]-1)][0], kl[int(Xf[0])][1], kl[int(Xf[0]-1)][1] IndexError: invalid index to scalar variable. No idea... Maybe Madi can help us out here :) Vero El jue., 21 feb. 2019 a las 11:37, Helmut Kudrnovsky (<hel...@web.de>) escribió: > [keep the discussion always on the ML!] > > >Gesendet: Donnerstag, 21. Februar 2019 um 11:25 Uhr > > > >Von: "Juan Lopez" <cuba...@gmail.com> > >An: > >Betreff: Re: [GRASS-user] r.width.funct in correct version > > > >Dear Helmut. > >This is the output of g.region command: > > > > > >GRASS 7.6.0 (nc):/departamento/Test/nc_basic_spm > g.region -p > >projection: 99 (Lambert Conformal Conic) > >zone: 0 > >datum: nad83 > >ellipsoid: a=6378137 es=0.006694380022900787 > >north: 228500 > >south: 215000 > >west: 630000 > >east: 645000 > >nsres: 10 > >ewres: 10 > >rows: 1350 > >cols: 1500 > >cells: 2025000 > > and what is the exact r.width.funct command you used? > > see > > https://grass.osgeo.org/grass74/manuals/addons/r.width.funct.html > > for an example: > > ########### > g.region raster=elevation -p > > # Calculate flow direction > r.stream.extract elevation=elevation threshold=1000 \ > direction=direction > > # Create outlet point > echo "637304.924954,218617.100523" | v.in.ascii input=- sep=',' out=outlet > > # Convert outlet point to raster > v.to.rast input=outlet type=point output=outlet use=cat > > # Calculate distance to outlet map > r.stream.distance -o stream_rast=outlet \ > direction=direction distance=dist2out > > # Calculate width function > r.width.funct map=dist2out image=/tmp/my_basin > ########### > > > kind regards > Helmut > > > > _______________________________________________ > grass-user mailing list > grass-user@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user