[GRASS-dev] [GRASS GIS] #3035: r.support sets wrong map title

#3035: r.support sets wrong map title
------------------------------+-------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Raster | Version:
Keywords: title, r.support | CPU: Unspecified
Platform: All |
------------------------------+-------------------------
There are 2 types of titles for rasters. One is a title specified in
'cats' files, the other one in 'hist' files.

Most modules (maybe all?) which have parameter title to set the title, for
example r.in.gdal, set the 'cats' title. However, r.support sets the
'hist' title.

Module r.info reports both as:

{{{
Title: South-West Wake county: Elevation NED 10m ( elev_ned10m )
}}}

where the long one is the 'cats' title and the one in parentheses is
'hist' title.

Quoting from https://grass.osgeo.org/grass43/manuals/progman42.pdf (page
102, about struct History):

''Note. Some of the information in this structure is not meaningful. For
example, if the raster file is renamed, or copied into
another mapset, the mapid and mapset will no longer be correct. Also the
title does not reflect the true raster file title. The
true title is maintained in the category file.''

So, to conclude, I suggest to change r.support to set the title in
category file, not the one in history file.

The question is if we want to modify the r.info title output or not.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3035&gt;
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version:
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------

Comment (by annakrat):

In [changeset:"68746" 68746]:
{{{
#!CommitTicketReference repository="" revision="68746"
r.support: write category title, not title in history file, see #3035
}}}

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

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version:
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------

Comment (by wenzeslaus):

In [changeset:"68748" 68748]:
{{{
#!CommitTicketReference repository="" revision="68748"
r.info: make category title the primary, use hist as fallback (see #3035)

This also makes the line shorter, so it more often fits
into the character limit and it does not contain the
stange parentheses (with spaces around them)
which were hard to interpret.

Follows r68746 and r68747.
}}}

--
Ticket URL: </ticket/3035#comment:2>
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------
Changes (by wenzeslaus):

* version: => unspecified

Comment:

Old `r.info elevation` in NC SPM:

{{{
+----------------------------------------------------------------------------+
  | Map: elevation ...
|
  | ...
|
  | Title: South-West Wake county: Elevation NED 10m ( elev_ned10m )
|
}}}

Current output (r68748):

{{{
+----------------------------------------------------------------------------+
  | Map: elevation ...
|
  | ...
|
  | Title: South-West Wake county: Elevation NED 10m
|
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3035#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------

Comment (by annakrat):

In [changeset:"69645" 69645]:
{{{
#!CommitTicketReference repository="" revision="69645"
r.info: make category title the primary also when using -e flag, see #3035
}}}

--
Ticket URL: </ticket/3035#comment:4>
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------

Comment (by neteler):

Should this be backported at some point?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3035#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------

Comment (by annakrat):

In [changeset:"69816" 69816]:
{{{
#!CommitTicketReference repository="" revision="69816"
r.support/r.info: set the right title and show it properly, see #3035
(merge from trunk, r68746-8, r69645)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3035#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3035: r.support sets wrong map title
--------------------------+------------------------------
  Reporter: annakrat | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.0
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: title, r.support
       CPU: Unspecified | Platform: All
--------------------------+------------------------------
Changes (by annakrat):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3035#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>