소스 검색

Added a screenshot to show the volume coordinate system and tile layout.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46744 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 14 년 전
부모
커밋
e589767d50

BIN
lib/g3d/g3d_volume_layout.png


BIN
lib/g3d/g3d_volume_layout.xcf


+ 1 - 1
lib/g3d/g3ddefaults.c

@@ -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

+ 20 - 5
lib/g3d/g3dlib.dox

@@ -8,13 +8,28 @@
 
 <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
 
@@ -417,7 +432,7 @@ The limit is specified in bytes. It is a limit on the size of cell-data stored
 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 @@ routines (reading, writing grid3d timestamps).
 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)

+ 13 - 0
lib/g3d/volume_tile_cell_generator.sh

@@ -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

+ 4 - 4
lib/gis/parser_standard_options.c

@@ -309,7 +309,7 @@ struct Option *G_define_standard_option(int opt)
         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 @@ struct Option *G_define_standard_option(int opt)
         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 @@ struct Option *G_define_standard_option(int opt)
         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 @@ struct Option *G_define_standard_option(int opt)
         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 */

+ 1 - 0
lib/raster/gdal.c

@@ -105,6 +105,7 @@ static void load_library(void)
     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",

BIN
raster3d/r3.in.ascii/g3d_volume_layout.png


+ 9 - 0
raster3d/r3.in.ascii/r3.in.ascii.html

@@ -32,6 +32,15 @@ not support non-compressed files.
 <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>

+ 16 - 14
raster3d/raster3dintro.html

@@ -13,20 +13,22 @@
 <!-- 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.
-
-<pre>
-      Top (z)
-       |
-       |     North
- West  | _ _ _ _ _ _ East (x)
-      / Bottom
-     /
-    /
- South (y)
-</pre>
+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.
+
+
+<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>