[GRASS-dev] [GRASS-SVN] r54302 - grass/trunk/scripts/r.mask

Markus Metz markus.metz.giswork at gmail.com
Sun Dec 16 12:06:12 PST 2012


On Sun, Dec 16, 2012 at 10:28 AM, Martin Landa <landa.martin at gmail.com> wrote:
> Hi,
>
> 2012/12/16 Markus Metz <markus.metz.giswork at gmail.com>:
>
> [...]
>
>> This is not possible because r.reclass expects the (raster) maskcats
>> syntax, not the (vector) cats syntax. Each syntax is well established
>
> I was not clear enough, I thought to change r.reclass syntax too.

OK. For r.reclass, only the left-hand part would need to be changed.
The relevant code is specific to r.reclass and looks pretty solid, it
may be not trivial to incorporate a new syntax.
>
>> and I don't think it's a good idea to sync the two (requiring too many
>> low-level changes that are neither bug fixes nor performance
>> improvements).
>
> Is there any reason why syntax for raster and vector cats need to be
> different? Or it's just historical artifact? Personally speaking,
> syntax for vector categories seems to be more natural for me. Keeping
> maskcats and cats could be quite misleading for the user. I think it's
> good time to think about synchronization of the syntax for categories.
> In other words, to change r.reclass to accept also vector cats syntax.
> r.reclass could accept the both syntaxes - old (current) and new one
> (vector based).

AFAICT, there is nothing like a raster categories syntax. Raster
modules working with ranges of categories similar to '1 2 3 5 thru 10'
have their own implementations, e.g. r.reclass and d.rast. All these
differences are most probably due to historical reasons, one module
was added after another. For vectors at least there is only one syntax
(added after the raster implementations I guess).

Markus M


More information about the grass-dev mailing list