r.to.rast3elev.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <h2>DESCRIPTION</h2>
  2. Creates a 3D volume map based on 2D elevation and value raster maps.
  3. If the 2d and 3d region settings are different,
  4. the 2d resolution will be adjust to the 3d resolution.
  5. <center>
  6. <img src="r.to.rast3elev.png" border="0"><br>
  7. <table border="0" width="700">
  8. <tr><td><center>
  9. <i>How r.to.rast3elev works</i>
  10. </center></td></tr>
  11. </table>
  12. </center>
  13. <h2>NOTES</h2>
  14. The hight of the 2D elevation maps will be used to verify the position
  15. within the 3D region. If the cell value of the elevation raster maps is located within the 3D region, the
  16. cell value of the appropriate 2D input raster maps will be written to the associated 3D cell.
  17. There are flags and options to fill the upper and lower 3D cells with a specific value, or the
  18. input raster maps values.
  19. <h2>Example</h2>
  20. Simple Spearfish sample data set example
  21. <div class="code"><pre>
  22. g.region raster=elevation.10m -p
  23. g.region res=200 res3=200 t=2000 b=0 tbres=20 -p
  24. # Write the values of raster map soils based on the elevation of elevation.10m
  25. # to the 3D map volev
  26. r.to.rast3elev in=soils elev=elevation.10m out=volev
  27. # Write the values of map soils based on the elevation of elevation.10m
  28. # to the 3D map volev_l and fill the lower cells with the soils map values
  29. r.to.rast3elev in=soils elev=elevation.10m out=volev_l -l
  30. # Write the values of map soils based on the elevation of elevation.10m
  31. # to the 3D map volev_u and fill the upper cells with the soils map values
  32. r.to.rast3elev in=soils elev=elevation.10m out=volev_u -u
  33. # Example with multiple elevation maps.
  34. ## first we need three support maps
  35. r.mapcalc expression="one = 1"
  36. r.mapcalc expression="two = 2"
  37. r.mapcalc expression="three = 3"
  38. ## Now we generate the new evelation maps
  39. r.mapcalc expression="elev_mid = elevation.10m - 500"
  40. r.mapcalc expression="elev_bottom = elevation.10m - 1000"
  41. ## Now fill the lower cells below the elevation maps with the values one, two and three
  42. r.to.rast3elev -l input=one,two,three elevation=elevation.10m,elev_mid,elev_bottom output=threelayer
  43. ## Export the map for visualization with paraview (http://www.paraview.org)
  44. ## By default the null value is -9999.99, we adjust it to 0.0 for
  45. ## better visualization
  46. r3.out.vtk null=0.0 input=threelayer output=/tmp/threelayer.vtk
  47. # Start paraview
  48. paraview --data=/tmp/threelayer.vtk
  49. # Note: First you need to choose the surface representation style and
  50. # then color by "threelayer" in paraview.
  51. </pre></div>
  52. <h2>SEE ALSO</h2>
  53. <em>
  54. <a href="r.to.rast3.html">r.to.rast3</a>,
  55. <a href="r3.cross.rast.html">r3.cross.rast</a>,
  56. <a href="g.region.html">g.region</a>
  57. </em>
  58. <h2>AUTHOR</h2>
  59. Soeren Gebbert
  60. <p><i>Last changed: $Date$</i>