[GRASS-SVN] r55464 - in grass/trunk/include: . defs

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 20 01:19:56 PDT 2013


Author: huhabla
Date: 2013-03-20 01:19:55 -0700 (Wed, 20 Mar 2013)
New Revision: 55464

Modified:
   grass/trunk/include/defs/raster3d.h
   grass/trunk/include/raster3d.h
Log:
Committed correct header files for the 3D raster library


Modified: grass/trunk/include/defs/raster3d.h
===================================================================
--- grass/trunk/include/defs/raster3d.h	2013-03-20 01:58:48 UTC (rev 55463)
+++ grass/trunk/include/defs/raster3d.h	2013-03-20 08:19:55 UTC (rev 55464)
@@ -48,12 +48,8 @@
 /* fpcompress.c */
 void Rast3d_fpcompress_print_binary(char *, int);
 void Rast3d_fpcompress_dissect_xdr_double(unsigned char *);
-int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int, int, int);
-int Rast3d_fpcompress_write_xdr_floats(int, char *, int, int, char *, int, int);
-int Rast3d_fpcompress_write_xdr_double(int, char *, int, int, char *, int, int);
+int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int);
 int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int);
-int Rast3d_fpcompress_read_xdr_floats(int, char *, int, int, int, char *);
-int Rast3d_fpcompress_read_xdr_doubles(int, char *, int, int, int, char *);
 
 /* alloc.c */
 void *Rast3d_malloc(int);
@@ -78,8 +74,8 @@
 int Rast3d_write_colors(const char *, const char *, struct Colors *);
 
 /* defaults.c */
-void Rast3d_set_compression_mode(int, int, int, int);
-void Rast3d_get_compression_mode(int *, int *, int *, int *);
+void Rast3d_set_compression_mode(int, int);
+void Rast3d_get_compression_mode(int *, int *);
 void Rast3d_set_cache_size(int);
 int Rast3d_get_cache_size(void);
 void Rast3d_set_cache_limit(int);
@@ -177,7 +173,7 @@
 void Rast3d_set_null_value(void *, int, int);
 
 /* open2.c */
-void *Rast3d_open_new_param(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int, int);
+void *Rast3d_open_new_param(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int);
 /* open.c */
 void *Rast3d_open_cell_old_no_header(const char *, const char *);
 void *Rast3d_open_cell_old(const char *, const char *, RASTER3D_Region *, int, int);
@@ -186,7 +182,7 @@
 
 /* param.c */
 void Rast3d_set_standard3d_input_params(void);
-int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *, int *,
+int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *,
 			    int *, int *, int *, int *, int *);
 void Rast3d_set_window_params(void);
 char *Rast3d_get_window_params(void);
@@ -255,18 +251,18 @@
 int Rast3d_read_header(RASTER3D_Map *, int *, int *, double *, double *, double *,
 		   double *, double *, double *, int *, int *, int *,
 		   double *, double *, double *, int *, int *, int *, int *,
-		   int *, int *, int *, int *, int *, int *, int *, char **, int *);
+		   int *, int *, int *, int *, int *, int *, int *, char **, int *, int *);
 int Rast3d_write_header(RASTER3D_Map *, int, int, double, double, double, double,
 		    double, double, int, int, int, double, double, double,
 		    int, int, int, int, int, int, int, int, int, int, int,
-		    char *, int);
+		    char *, int, int);
 int Rast3d_rewrite_header(RASTER3D_Map * map);
 int Rast3d_cache_size_encode(int, int);
 int Rast3d__compute_cache_size(RASTER3D_Map *, int);
 int Rast3d_fill_header(RASTER3D_Map *, int, int, int, int, int, int, int, int, int,
 		   int, int, int, int, int, int, int, double, double, double,
 		   double, double, double, int, int, int, double, double,
-		   double, char *, int);
+		   double, char *, int, int);
 /* headerinfo.c */
 void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *);
 void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *);

Modified: grass/trunk/include/raster3d.h
===================================================================
--- grass/trunk/include/raster3d.h	2013-03-20 01:58:48 UTC (rev 55463)
+++ grass/trunk/include/raster3d.h	2013-03-20 08:19:55 UTC (rev 55464)
@@ -4,17 +4,16 @@
 #include <grass/gis.h>
 #include <grass/raster.h>
 
+#define RASTER3D_MAP_VERSION 2 /* Second version of the raster 3D map layout.
+                                * Old maps withput version information are
+                                * defined as version == 1 when reading the header.
+                                */
+
 #define RASTER3D_TILE_SAME_AS_FILE 2
 
 #define RASTER3D_NO_COMPRESSION 0
 #define RASTER3D_COMPRESSION 1
 
-#define RASTER3D_USE_LZW 1
-#define RASTER3D_NO_LZW 0
-
-#define RASTER3D_USE_RLE 1
-#define RASTER3D_NO_RLE 0
-
 #define RASTER3D_MAX_PRECISION -1
 
 #define RASTER3D_NO_CACHE 0
@@ -72,6 +71,7 @@
 
 typedef struct RASTER3D_Map
 {
+	int version; /* The version of the raster 3D map layout */
 
     char *fileName;
     char *tempName;
@@ -110,10 +110,10 @@
     /* data concering the compression */
     int precision;		/* RASTER3D_MAX_PRECISION or, 0 .. 23 for float, 
 				   0 .. 52 for double */
-    int compression;		/* RASTER3D_NO_COMPRESSION or RASTER3D_USE_COMPRESSION */
-    int useLzw;			/* RASTER3D_USE_LZW or RASTER3D_NO_LZW */
-    int useRle;			/* RASTER3D_USE_RLE or RASTER3D_NO_RLE */
-    int useXdr;			/* RASTER3D_USE_XDR or RASTER3D_NO_XDR */
+    int compression;		/* RASTER3D_NO_COMPRESSION or RASTER3D_COMPRESSION */
+    int useLzw;			/* RASTER3D_USE_LZW or RASTER3D_NO_LZW !!! only kept for backward compatibility */
+    int useRle;			/* RASTER3D_USE_RLE or RASTER3D_NO_RLE !!! only kept for backward compatibility */
+    int useXdr;			/* RASTER3D_USE_XDR or RASTER3D_NO_XDR !!! only kept for backward compatibility */
 
     /* pointer to first tile in file */
     int offset;
@@ -158,7 +158,7 @@
 
     int useCache;		/* 1 if cache is used */
     void *cache;		/* pointer to cache structure */
-    int cacheFD;		/* file discriptor of cache file -- write mode only */
+    int cacheFD;		/* file descriptor of cache file -- write mode only */
     char *cacheFileName;	/* filename of cache file -- write mode only */
     long cachePosLast;		/* position of last entry in cache file -- write */
     /* mode only */



More information about the grass-commit mailing list