[GRASS-dev] Re: [GRASS GIS] #1506: r.to.rast3: support for float datatype

GRASS GIS trac at osgeo.org
Wed Dec 7 03:22:22 EST 2011

#1506: r.to.rast3: support for float datatype
 Reporter:  hamish       |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  6.5.0                    
Component:  Raster3D     |     Version:  svn-trunk                
 Keywords:  r.to.rast3   |    Platform:  All                      
      Cpu:  All          |  

Comment(by hamish):

 ps- the post-processing work-around:
  r3.mapcalc "map3d.float = float(map3d)"

 unfortunately the result is many many times larger. (4.6mb double -> 86mb
 float grid3/cell file in my test)

  grid3$ diff map3d/cellhd map3d.float/cellhd
  @@ -15,11 +15,11 @@
   TileDimensionX: 8
   TileDimensionY: 8
   TileDimensionZ: 8
  -CellType: double
  +CellType: float
   useCompression: 1
   useRle: 1
   useLzw: 0
  -Precision: 23
  +Precision: -1
   nofHeaderBytes: 16
   useXdr: 1
   hasIndex: 1

 but there is no `r3.compress` or `r3.support` utility to adjust that. (is
 precision=23 meaningful for doubles? isn't anything >16 sig. digits going
 to be noise?)

 Only `r3.in.ascii` and `r3.in.v5d` have controls for these:
            type   Data type used in the output file
                   options: default,double,float
                   default: default
       precision   Precision used in the output file (default, max, or 0 to
                   default: default
     compression   The compression method used in the output file
                   options: default,rle,none
                   default: default
   tiledimension   The dimensions of the tiles used in the output file
                   default: default


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

More information about the grass-dev mailing list