[GRASS-SVN] r46744 - in grass/trunk: lib/g3d lib/gis lib/raster raster3d raster3d/r3.in.ascii

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 20 06:34:19 EDT 2011


Author: huhabla
Date: 2011-06-20 03:34:19 -0700 (Mon, 20 Jun 2011)
New Revision: 46744

Added:
   grass/trunk/lib/g3d/g3d_volume_layout.png
   grass/trunk/lib/g3d/g3d_volume_layout.xcf
   grass/trunk/lib/g3d/volume_tile_cell_generator.sh
   grass/trunk/raster3d/r3.in.ascii/g3d_volume_layout.png
Modified:
   grass/trunk/lib/g3d/g3ddefaults.c
   grass/trunk/lib/g3d/g3dlib.dox
   grass/trunk/lib/gis/parser_standard_options.c
   grass/trunk/lib/raster/gdal.c
   grass/trunk/raster3d/r3.in.ascii/r3.in.ascii.html
   grass/trunk/raster3d/raster3dintro.html
Log:
Added a screenshot to show the volume coordinate system and tile layout.

Added: grass/trunk/lib/g3d/g3d_volume_layout.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/lib/g3d/g3d_volume_layout.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: grass/trunk/lib/g3d/g3d_volume_layout.xcf
===================================================================
(Binary files differ)


Property changes on: grass/trunk/lib/g3d/g3d_volume_layout.xcf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: grass/trunk/lib/g3d/g3ddefaults.c
===================================================================
--- grass/trunk/lib/g3d/g3ddefaults.c	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/lib/g3d/g3ddefaults.c	2011-06-20 10:34:19 UTC (rev 46744)
@@ -11,7 +11,7 @@
 #define G3D_USE_LZW_DEFAULT G3D_NO_LZW
 #define G3D_USE_RLE_DEFAULT G3D_USE_RLE
 #define G3D_PRECISION_DEFAULT G3D_MAX_PRECISION
-#define G3D_CACHE_SIZE_DEFAULT 262144
+#define G3D_CACHE_SIZE_DEFAULT 1000
 #define G3D_CACHE_SIZE_MAX_DEFAULT 16777216
 #define G3D_FILE_TYPE_DEFAULT DCELL_TYPE
 #define G3D_TILE_X_DEFAULT 16

Modified: grass/trunk/lib/g3d/g3dlib.dox
===================================================================
--- grass/trunk/lib/g3d/g3dlib.dox	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/lib/g3d/g3dlib.dox	2011-06-20 10:34:19 UTC (rev 46744)
@@ -8,14 +8,29 @@
 
 <P>
 Authors: Roman Waupotitsch and Michael Shapiro, Helena Mitasova, 
-         Bill Brown, Lubos Mitas, Jaro Hofierka
+         Bill Brown, Lubos Mitas, Jaro Hofierka, 
+         Minor modification, code cleanup and test suite by Soeren Gebbert
+         
 
 
 <b>Overview</b>
 
-The Grid3D raster volume Library is used for the r3.* and sites/vector
-volume tools.
+The Grid3D raster volume Library is used for the r3.* and vector
+volume tools. The G3D library uses a tile cache based approach to store floating point
+ values in abritrary order in a volume. The coordinate system of a volume is 
+column and row compatible to the raster library and counts from the bottom to the top
+of the cube.
 
+<center>
+<img src=g3d_volume_layout.png border=0><BR>
+<table border=0 width=700>
+<tr><td><center>
+<i>The volume coordinate system and tile layout of the G3D library</i>
+</center></td></tr>
+</table>
+</center>
+
+
 \section Directory_Structure Directory Structure
 
 <P>
@@ -417,7 +432,7 @@
 in the cache and does not include the support structure.
 
 <P>
-Default G3D_CACHE_SIZE_MAX_DEFAULT. This is currently set to 2meg and can
+Default G3D_CACHE_SIZE_MAX_DEFAULT. This is currently set to 16meg and can
 be changed at compilation time of the library.
 
 <P>
@@ -1682,7 +1697,7 @@
 These functions were implemented to test the library. They are not very
 efficient but can be used as starting point for other
 applications. Some of them might actually be useful. They are available from
-GRASS 5 source code in src/libes/g3d/.
+GRASS 7 source code in lib/g3d/.
 
 <P>
 void G3d_retile(void *map, char *nameOut, int tileX, int tileY, int tileZ)

Added: grass/trunk/lib/g3d/volume_tile_cell_generator.sh
===================================================================
--- grass/trunk/lib/g3d/volume_tile_cell_generator.sh	                        (rev 0)
+++ grass/trunk/lib/g3d/volume_tile_cell_generator.sh	2011-06-20 10:34:19 UTC (rev 46744)
@@ -0,0 +1,13 @@
+# Use this script to generate the VTK files for volume visualization
+# showing voxel, tiles and tile dimension.
+# VTK files can bevisualized with Paraview (www.paraview.org)
+
+g.region s=0 n=120 w=0 e=160 b=0 t=80 res3=10 -p3
+r3.mapcalc --o expr="volume = col() + row() + depth()"
+r3.out.vtk --o input=volume output=volume.vtk dp=0 null=0
+
+g.region s=0 n=120 w=0 e=160 b=0 t=80 res3=40 -p3
+r3.out.vtk --o input=volume output=tiles.vtk dp=0 null=0
+
+g.region s=0 n=40 w=0 e=40 b=40 t=80 res3=10 -p3
+r3.out.vtk --o input=volume output=tile.vtk dp=0 null=0

Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/lib/gis/parser_standard_options.c	2011-06-20 10:34:19 UTC (rev 46744)
@@ -309,7 +309,7 @@
         Opt->multiple = NO;
         Opt->answer = "default";
         Opt->options = "default,double,float";
-        Opt->description = _("Data type used in the output file");
+        Opt->description = _("Data type used in the output raster3d map");
 	break;
     case G_OPT_R3_PRECISION:
         Opt->key = "precision";
@@ -318,7 +318,7 @@
         Opt->multiple = NO;
         Opt->answer = "default";
         Opt->description =
-            _("Precision used in the output file (default, max, or 0 to 52)");
+            _("Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
 	break;
     case G_OPT_R3_COMPRESSION:
         Opt->key = "compression";
@@ -328,7 +328,7 @@
         Opt->answer = "default";
         Opt->options = "default,rle,none";
         Opt->description =
-            _("The compression method used in the output file");
+            _("The compression method used in the output raster3d map");
 	break;
     case G_OPT_R3_TILE_DIMENSION:
         Opt->key = "tiledimension";
@@ -338,7 +338,7 @@
         Opt->key_desc = "XxYxZ";
         Opt->answer = "default";
         Opt->description =
-            _("The dimensions of the tiles used in the output file (XxYxZ)");
+            _("The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
 	break;
         
 	/*vector maps */

Modified: grass/trunk/lib/raster/gdal.c
===================================================================
--- grass/trunk/lib/raster/gdal.c	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/lib/raster/gdal.c	2011-06-20 10:34:19 UTC (rev 46744)
@@ -105,6 +105,7 @@
     static const char *const candidates[] = {
 # ifdef __unix__
 	"libgdal.1.1.so",
+	"libgdal1.6.0.so",
 	"gdal.1.0.so",
 	"gdal.so.1.0",
 	"libgdal.so.1",

Added: grass/trunk/raster3d/r3.in.ascii/g3d_volume_layout.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/raster3d/r3.in.ascii/g3d_volume_layout.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: grass/trunk/raster3d/r3.in.ascii/r3.in.ascii.html
===================================================================
--- grass/trunk/raster3d/r3.in.ascii/r3.in.ascii.html	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/raster3d/r3.in.ascii/r3.in.ascii.html	2011-06-20 10:34:19 UTC (rev 46744)
@@ -32,6 +32,15 @@
 <DD>Name of the G3D output map
 </DL>
 
+<center>
+<img src="g3d_volume_layout.png" border=0><BR>
+<table border=0 width=700>
+<tr><td><center>
+<i>The volume coordinate system and tile layout of the inported voxel map</i>
+</center></td></tr>
+</table>
+</center>
+
 <H2>NOTES</H2>
 The format for the ascii file is:
 <pre>

Modified: grass/trunk/raster3d/raster3dintro.html
===================================================================
--- grass/trunk/raster3d/raster3dintro.html	2011-06-20 03:20:08 UTC (rev 46743)
+++ grass/trunk/raster3d/raster3dintro.html	2011-06-20 10:34:19 UTC (rev 46744)
@@ -13,21 +13,23 @@
 <!-- meta page description: 3D Raster data (voxel) introduction -->
 <h2>3D Raster data (voxel) in GRASS GIS</h2>
 
-The 3d raster data implementation in GRASS GIS uses the same coordinate system as
-raster data (row count from north to south) with an additional z dimension (depth)
-coutning from bottom to top.
+GRASS GIS raster3d maps use the same coordinate system as
+2d raster maps (row count from north to south) with an additional z dimension (depth)
+coutning from bottom to top. The upper left corner (NW) is the origin of the volume. 
+Volumes are stored using a tile cache based approach. This allows abritrary read 
+and write operations in the created volume. The size of the tiles can be specified at import time
+with r3.in.ascii or the data can be retiles using r3.retile after import or creation.
 
-<pre>
-      Top (z)
-       |
-       |     North
- West  | _ _ _ _ _ _ East (x)
-      / Bottom
-     /
-    /
- South (y)
-</pre>
 
+<center>
+<img src="g3d_volume_layout.png" border=0><BR>
+<table border=0 width=700>
+<tr><td><center>
+<i>The volume coordinate system and tile layout of the G3D library</i>
+</center></td></tr>
+</table>
+</center>
+
 <h3>3D Raster (voxel) import</h3>
 
 The module <a href="r3.in.ascii.html">r3.in.ascii</a> supports



More information about the grass-commit mailing list