Opened 5 years ago

Closed 5 years ago

#3810 closed enhancement (invalid)

r.external.out: format parameter wish

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.8.0
Component: Raster Version: svn-trunk
Keywords: r.external.out, GDAL Cc:
CPU: Unspecified Platform: Unspecified

Description

So far r.external.out does not allow to enforce the output format as r.out.gdal does. A new parameter would be nice to have for this.

Rationale: writing out NDVI * 1000 as Int16 is currently not possible with r.external.out as NBITS=16 isn't properly accepted (GDAL refuses to accept it as currently Int32 is written out).

Change History (1)

in reply to:  description comment:1 by mmetz, 5 years ago

Resolution: invalid
Status: newclosed

Replying to neteler:

So far r.external.out does not allow to enforce the output format as r.out.gdal does. A new parameter would be nice to have for this.

Rationale: writing out NDVI * 1000 as Int16 is currently not possible with r.external.out as NBITS=16 isn't properly accepted (GDAL refuses to accept it as currently Int32 is written out).

This is not concerning the format, but the datatype. The name of the module is

r.external.out - Redirects raster output to file utilizing GDAL library rather than storing in GRASS raster format. 

That means all raster output is written in the selected GDAL format. Obviously the datatype can vary, depending on which raster output is created.

In this example, writing out as Int16 is only possible if all cell values fit into Int16. But all cell values are not known when writing out, i.e. you need to write out the raster in GRASS native format and then determine which GDAL datatype is suitable to store the GRASS raster map. In this case you need to use r.out.gdal.

Note: See TracTickets for help on using tickets.