Sorry, forgot to mention, that water has to be NULL and everything else NOT 
NULL before you run 1) (r.grow.distance), and in 3) (r.mapcalc) the value has 
to be below or equal the resolution…

Cheers
Stefan

From: Blumentrath, Stefan
Sent: torsdag 20. april 2017 20.14
To: 'Giuseppe Amatulli' <[email protected]>; GRASS user list 
<[email protected]>
Subject: RE: [GRASS-user] select only patches with 1-cell width

Hi Giuseppe,

Not a single command, but you could:

1.       run r.grow.distance, then

2.       r.neighbors with 5 pixels circular neighborhood and maximum statistics

3.       r.mapcalc expression=”result=max_nbh_5<=1,1,null()”

If you want to get a vector lines result you might need r.thin and v.to.rast 
after that.

Hope that helps!

Cheers
Stefan


From: grass-user [mailto:[email protected]] On Behalf Of 
Giuseppe Amatulli
Sent: torsdag 20. april 2017 18.06
To: GRASS user list 
<[email protected]<mailto:[email protected]>>
Subject: [GRASS-user] select only patches with 1-cell width


Hi,
I have a huge streams/lakes dataset and I want to be able to select only water 
bodies (streams) with 1-cell width.
In other words if i have this raster


[Inline images 1]

I want to select only this streams

[Inline images 2]


Any suggestion or grass command that does such operation.
Thank you
Best
--
Giuseppe Amatulli, Ph.D.

Research scientist at
Yale School of Forestry & Environmental Studies
Yale Center for Research Computing
Center for Science and Social Science Information
New Haven, 06511
Teaching: http://spatial-ecology.org
Work:  https://environment.yale.edu/profile/giuseppe-amatulli/
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to