Opened 9 years ago

Closed 8 years ago

#3035 closed defect (fixed)

r.support sets wrong map title

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Raster Version: unspecified
Keywords: title, r.support Cc:
CPU: Unspecified Platform: All

Description

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.

Change History (7)

comment:1 by annakrat, 8 years ago

In 68746:

r.support: write category title, not title in history file, see #3035

comment:2 by wenzeslaus, 8 years ago

In 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.

comment:3 by wenzeslaus, 8 years ago

Version: unspecified

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                        |

comment:4 by annakrat, 8 years ago

In 69645:

r.info: make category title the primary also when using -e flag, see #3035

comment:5 by neteler, 8 years ago

Should this be backported at some point?

comment:6 by annakrat, 8 years ago

In 69816:

r.support/r.info: set the right title and show it properly, see #3035 (merge from trunk, r68746-8, r69645)

comment:7 by annakrat, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.