Opened 13 years ago

Closed 13 years ago

#1392 closed defect (worksforme)

r3.to.rast converts FCELL map data to 0

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 6.4.2
Component: Raster3D Version: svn-develbranch6
Keywords: r3.to.rast Cc: huhabla
CPU: x86-64 Platform: Linux

Description

tested in 6.5svn.

man page test case:

cat << EOF > test.g3d
north: 4925010.000000
south: 4924890.000000
east: 596760.000000
west: 596610.000000
top: 1.000000
bottom: 0.000000
rows: 4
cols: 5
levels: 1
1204.74 1204.48 1204.19 1203.81 1203.39
1203.89 1203.67 1203.34 1202.98 1202.43
1203.05 1202.80 1202.51 1202.11 1201.48
1202.10 1201.92 1201.62 1201.27 1200.68
EOF

r3.in.ascii in=test.g3d out=test3d.f type=float

r3.info test3d.f
 |   Type of Map:  3d cell              Number of Categories: 0               |
 |   Data Type:    float                                                      |
 |   Rows:         4                                                          |
 |   Columns:      5                                                          |
 |   Depths:       1                                                          |
 |   Total Cells:  20                                                         |
 |        Projection: UTM (zone 13)                                           |
 |            N:    4925010    S:    4924890   Res:    30                     |
 |            E:     596760    W:     596610   Res:    30                     |
 |            T:          1    B:          0   Res:     1                     |
 |   Range of data:   min =    1200.68 max =    1204.74                       |

g.region rast3d=test3d.f
r3.to.rast test3d.f out=test3d.f
r.info -r test3d.f_00001
min=0
max=0

but double works:

r3.in.ascii in=test.g3d out=test3d.d type=double
r3.to.rast test3d.d out=test3d.d
     #try it twice: r3.to.rast has --overwrite set by default?!

r.info -r test3d.d_00001
min=1200.68
max=1204.74

Hamish

Change History (3)

comment:1 by hamish, 13 years ago

Component: RasterRaster3D

comment:2 by hamish, 13 years ago

note

  • both FCELL and DCELL 3D rasters have "Number of Categories: 0" in r3.info.
  • r.info for both F,D results of r3.to.rast report 255 cats.

??, H

comment:3 by huhabla, 13 years ago

Cc: huhabla added
Resolution: worksforme
Status: newclosed

The FCELL bug should be fixed in trunk r46745. Additional float test is implemented. In case this works on other machine it should backported to 6.4 and 6.5.

The number of categories is in r46745 equal between raster and raster3d -> 0.

Best Soeren

Note: See TracTickets for help on using tickets.