[GRASS-user] weird r.thin output

Markus Neteler neteler at osgeo.org
Tue Feb 16 09:07:56 EST 2010


On Fri, Feb 12, 2010 at 7:44 PM, sidtupper <sid at sidtupper.ca> wrote:
> I'm trying to digitize a paper map of an island. I've decomposed a scan of
> it into layers, one layer per file. One of the layers, polygons representing
> the high tide line, is a greyscale jpeg file with just two colours (0, 255).
> Imported into GRASS 6.3 (Linux 2.31.6 kernel) and processed with r.thin,
> after 429 iterations it becomes a mess of horizonal, vertical and 45 degree
> straight lines. In case these files would be helpful to see what's going on,
> I attach them. The input file is hermit-hightide-2colour.jpg and the
> exported output is hightide-thin.png. I hope someone can tell me what I'm
> doing wrongly. Thanks.

The map is not a binary map but contains 13 grades of black and 12 grades
of white. A proper thresholding is needed (e.g., using r.mapcalc with the
if() function to threshold the values.

r.thin sees white grades rather than null and hence cannot follow the lines
which should also consist of only one color.

Perhaps I am just seeing a JPG (lossy compression) artifact but with
d.what.rast you could check if the map is really binary.

Markus


More information about the grass-user mailing list