[GRASS-dev] standarizing range syntax

Michael Barton michael.barton at asu.edu
Wed Aug 13 00:22:59 EDT 2008


Currently, due to its history, GRASS has various ways of designating a  
range of values.

In raster displays (d.rast) ranges are expressed as 'n-n';
for color tables, they are implied but not explicitly given;
for raster reclass maps (r.reclass), they are expressed as 'n thru n'
for raster recode (r.recode), they are expressed as 'n:n';
for vector reclass (actually a recode, v.reclass), ranges are  
expressed in SQL syntax

At least for rasters, I'd like to suggest that we standardize range  
notation.

I recommend 'n-n'. It is compact, widely recognized, and doesn't use a  
misspelled english word ("thru"). The syntax 'n:n' is used in some  
programming, but not a lot beyond that.

I suppose that each module might also accept it's old non-standard  
syntax, too, to maintain backward compatibility for scripts.

Michael


More information about the grass-dev mailing list