[GRASS-dev] [GRASS GIS] #3929: r.external vs r.in.gdal under Linux using r.his

GRASS GIS trac at osgeo.org
Sun Nov 3 08:46:12 PST 2019


#3929: r.external vs r.in.gdal under Linux using r.his
-------------------------------+-------------------------
  Reporter:  Nikos Alexandris  |      Owner:  grass-dev@…
      Type:  defect            |     Status:  closed
  Priority:  normal            |  Milestone:
 Component:  Default           |    Version:  unspecified
Resolution:  invalid           |   Keywords:  7.9.dev
       CPU:  Unspecified       |   Platform:  Linux
-------------------------------+-------------------------
Changes (by mmetz):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 The differences are caused by different color rules. From the manual of
 r.his:

 "First, the working color is set to the color of the corresponding cell in
 the map layer chosen to represent hue. Second, this color is multiplied by
 the red intensity of that cell in the intensity map layer. This map layer
 should have an appropriate gray-scale color table associated with it."

 r.in.gdal reads GRASS color rules embedded in metadata, e.g. for
 raster_4class.tif:

 {{{
   Metadata:
     COLOR_TABLE_RULES_COUNT=5
     COLOR_TABLE_RULE_RGB_0=1.000000e+00 1.600000e+00 255 255 0 0 255 0
     COLOR_TABLE_RULE_RGB_1=1.600000e+00 2.200000e+00 0 255 0 0 255 255
     COLOR_TABLE_RULE_RGB_2=2.200000e+00 2.800000e+00 0 255 255 0 0 255
     COLOR_TABLE_RULE_RGB_3=2.800000e+00 3.400000e+00 0 0 255 255 0 255
     COLOR_TABLE_RULE_RGB_4=3.400000e+00 4.000000e+00 255 0 255 255 0 0
 }}}


 r.external does not read these metadata and instead assigns some default
 color rules, or none, depending on the input datatype.

 In short, you need to assign appropriate gray-scale color rules first for
 r.his.

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



More information about the grass-dev mailing list