[GRASS-dev] [GRASS GIS] #3667: Add an option to add grey color scale to r.in.gdal imports

GRASS GIS trac at osgeo.org
Mon Oct 1 00:54:18 PDT 2018

#3667: Add an option to add grey color scale to r.in.gdal imports
  Reporter:  pierreroudier  |      Owner:  grass-dev@…
      Type:  enhancement    |     Status:  new
  Priority:  normal         |  Milestone:  7.8.0
 Component:  Display        |    Version:  7.4.1
Resolution:                 |   Keywords:  d.rast, default color table
       CPU:  All            |   Platform:  All
Changes (by mmetz):

 * component:  Default => Display
 * platform:  Unspecified => All
 * version:  unspecified => 7.4.1
 * milestone:   => 7.8.0
 * keywords:   => d.rast, default color table
 * cpu:  Unspecified => All


 Replying to [ticket:3667 pierreroudier]:
 > At the moment `r.in.gdal` automatically affects the `viridis` colour
 palette to any raster layer imported.

 It is not `r.in.gdal` but the raster library that assigns `viridis`, the
 default color table, if a raster does not have a color table assigned.
 > I think that's a good thing, and for single layer rasters it corresponds
 to best modern practice.
 > It is however slightly annoying when importing imagery, and necessitate
 to loop through the bands with `r.colors layer.i col=grey`.
 > I think the best of both worlds could be achieved by adding a flag `-g`
 to `r.in.gdal` that would force the colour palette to be `grey`.

 `r.in.gdal` assigns a color table only if color table information is
 available in the input metadata.

 Thus the solution would be to either use `grey` as default for CELL maps
 (in the raster library), or specifically assign a color table with

 Anyway, this is not an issue of `r.in.gdal`.

Ticket URL: <https://trac.osgeo.org/grass/ticket/3667#comment:1>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list