Opened 15 years ago
Closed 12 years ago
#912 closed defect (fixed)
r3.mapcalc depth() and z() function upside down
Reported by: | ayepri | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.0 |
Component: | Default | Version: | unspecified |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | All |
Description
# computation of a 3d raster with z values from the z() function r3.mapcalc Z='z()' # export to VTK format (see attached image grid_inversed_z.png) r3.out.vtk Z output=./Z_3dg.vtk
In r3.mapcalc, z() function returns -z, and depth() function returns the elevation of the cell. On the grid_inversed_z.png (viewed in Paraview), one can note that higher Z values are at the bottom of the grid (mind the axis at the bottom left). mputed z() isosurfaces are not horizontal (see grid_inversed_deformed_z)
Attachments (2)
Change History (3)
by , 15 years ago
Attachment: | grid_inversed_deformed_z.png added |
---|
by , 12 years ago
Attachment: | r3mapclac_paraview_z_coordinate.png added |
---|
comment:1 by , 12 years ago
Platform: | MacOSX → All |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This issue should be fixed in trunk r52769, 6.4.svn r52771 and 6.5.svn r52772. Now the z-coordinate is computed from bottom to the top.
Example:
GRASS 7.0.svn (TestLL):~ > g.region b=0 t=100 n=90 s=-90 e=180 w=-180 res3=20 res=20 -p3 projection: 3 (Latitude-Longitude) zone: 0 datum: wgs84 ellipsoid: wgs84 north: 90N south: 90S west: 180W east: 180E top: 100.00000000 bottom: 0.00000000 nsres: 20 nsres3: 20 ewres: 20 ewres3: 20 tbres: 20 rows: 9 rows3: 9 cols: 18 cols3: 18 depths: 5 cells: 162 cells3: 810 GRASS 7.0.svn (TestLL):~ > r3.mapcalc expr="test = z()" --o 100% GRASS 7.0.svn (TestLL):~ > r3.out.vtk input=test output=/tmp/test.vtk --o && paraview --data=/tmp/test.vtk 100%
Result see attachment: r3mapclac_paraview_z_coordinate.png
volume filled with z() values from r3.mapcalc and visualized with Paraview