Opened 5 years ago

Closed 3 years ago

#2540 closed defect (fixed)

[PATCH] Add options to r.out.gdal to suppress GRASS specific metadata items

Reported by: rouault Owned by: grass-dev@…
Priority: normal Milestone: 7.0.5
Component: Raster Version: svn-trunk
Keywords: r.out.gdal Cc:
CPU: Unspecified Platform: Unspecified

Description

The attached patch adds 2 new options flags: -r : Do not write COLOR_TABLE_RULES_xxxx metadata item. (The 'r' is the one of rules) -g : Do not write Generated_with metadata item

Those metadata items are fairly GRASS specific and do not make sense for most users of rasters generated with r.out.gdal, potentially leading to confusion or compatiblity problems

Attachments (1)

suppress_metadata_r_out_gdal.patch (3.2 KB) - added by rouault 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by rouault

comment:1 Changed 5 years ago by rouault

Summary: [PATCH] Add options to r.out.gdal[PATCH] Add options to r.out.gdal to suppress GRASS specific metadata items

comment:2 Changed 3 years ago by martinl

Milestone: 7.0.07.0.5

comment:3 in reply to:  description Changed 3 years ago by mmetz

Replying to rouault:

The attached patch adds 2 new options flags: -r : Do not write COLOR_TABLE_RULES_xxxx metadata item. (The 'r' is the one of rules) -g : Do not write Generated_with metadata item

Those metadata items are fairly GRASS specific and do not make sense for most users of rasters generated with r.out.gdal, potentially leading to confusion or compatiblity problems

There is a new flag 'm' to enhance compatibility with regard to metadata. If the flag is set, GRASS color rules are not written to metadata, and the "Generated_with" metadata key has been replaced with TIFFTAG_SOFTWARE for GTiff (one of the baseline TIFF tags).

Some software expects a nodata value in the metadata, even if there are no nodata in a band. If a nodata value is given with the nodata option, it is now always written to metadata. Implemented in r69128-30 for relbr70, relbr72, and trunk.

comment:4 Changed 3 years ago by martinl

Can we close the ticket?

comment:5 Changed 3 years ago by neteler

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