[GRASS-user] select only patches with 1-cell width

Nikos Alexandris nik at nikosalexandris.net
Thu Apr 20 14:26:10 PDT 2017

* Giuseppe Amatulli <giuseppe.amatulli at gmail.com> [2017-04-20 12:05:42 -0400]:


Hi Giuseppe,

>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
>[image: Inline images 1]
>I want to select only this streams
>[image: Inline images 2]

Interesting. I don't think there already exists a grass command to do

Just an idea: a function, carefully designed to select only pixels with max.
two neighboring pixels, max. two in a row, max. two in a column or two in a
diagonal, etc.

Perhaps a filter? A moving window that will scan the image and "collect"
only pixels that satisfy carefully thought criteria.


>Any suggestion or grass command that does such operation.
>Thank you
>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
>grass-user at lists.osgeo.org

Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 

More information about the grass-user mailing list