GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
raster3d_intern.h File Reference
#include <grass/raster3d.h>
#include <grass/gis.h>
Include dependency graph for raster3d_intern.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RASTER3D_LONG_LENGTH   sizeof(long)
 
#define RASTER3D_XDR_INT_LENGTH   4 /* Only kept for backward compatibility */
 
#define RASTER3D_XDR_DOUBLE_LENGTH
 
#define RASTER3D_XDR_FLOAT_LENGTH   4 /* Only kept for backward compatibility */
 
#define RASTER3D_IS_CORRECT_TYPE(t)   (((t) == FCELL_TYPE) || ((t) == DCELL_TYPE))
 
#define RASTER3D_WRITE_DATA   1
 
#define RASTER3D_READ_DATA   0
 
#define RASTER3D_VALID_OPERATION(o)    (((o) == RASTER3D_WRITE_DATA) || ((o) == RASTER3D_READ_DATA))
 
#define RASTER3D_MIN(a, b)   ((a) <= (b) ? (a) : (b))
 
#define RASTER3D_MAX(a, b)   ((a) >= (b) ? (a) : (b))
 
#define RASTER3D_HAS_INDEX   1
 
#define RASTER3D_NO_INDEX   0
 
#define RASTER3D_USE_XDR   1 /* Only kept for backward compatibility */
 
#define RASTER3D_NO_XDR   0 /* Only kept for backward compatibility */
 
#define RASTER3D_VALID_XDR_OPTION(o)    (((o) == RASTER3D_USE_XDR) || ((o) == RASTER3D_NO_XDR))
 
#define RASTER3D_REGION_NORTH   "North"
 
#define RASTER3D_REGION_SOUTH   "South"
 
#define RASTER3D_REGION_EAST   "East"
 
#define RASTER3D_REGION_WEST   "West"
 
#define RASTER3D_REGION_TOP   "Top"
 
#define RASTER3D_REGION_BOTTOM   "Bottom"
 
#define RASTER3D_REGION_ROWS   "nofRows"
 
#define RASTER3D_REGION_COLS   "nofCols"
 
#define RASTER3D_REGION_DEPTHS   "nofDepths"
 
#define RASTER3D_REGION_PROJ   "Proj"
 
#define RASTER3D_REGION_ZONE   "Zone"
 
#define RASTER3D_REGION_EWRES   "e-w resol"
 
#define RASTER3D_REGION_NSRES   "n-s resol"
 
#define RASTER3D_REGION_TBRES   "t-b resol"
 
#define EASTERN_TO_COL(east, region)   (east - region->west) / (region->ew_res);
 
#define NORTHERN_TO_ROW(north, region)    (region->north - north) / (region->ns_res);
 
#define TOP_TO_DEPTH(top, region)   (top - region->bottom) / (region->tb_res);
 
#define LOCATION_TO_COORD(region, north, east, top, x, y, z)
 
#define COL_TO_EASTERN(region, x)   region->west + x * region->ew_res;
 
#define ROW_TO_NORTHERN(region, y)   region->north - y * region->ns_res;
 
#define DEPTH_TO_TOP(region, z)   region->bottom + z * region->tb_res;
 
#define COORD_TO_LOCATION(region, x, y, z, north, east, top)
 

Functions

void Rast3d_fatal_error (const char *,...)
 Prints fatal error message. More...
 
void Rast3d_fatal_error_noargs (const char *)
 

Variables

void * tmpCompress
 
int tmpCompressLength
 
void * xdr
 
int xdrLength
 
int g3d_version
 
int g3d_do_compression
 
int g3d_precision
 
int g3d_cache_default
 
int g3d_cache_max
 
int g3d_file_type
 
int g3d_tile_dimension [3]
 
void(* g3d_error_fun )(const char *)
 
char * g3d_unit_default
 
int g3d_vertical_unit_default
 
RASTER3D_Region g3d_window
 

Macro Definition Documentation

◆ COL_TO_EASTERN

#define COL_TO_EASTERN (   region,
  x 
)    region->west + x * region->ew_res;

Definition at line 114 of file raster3d_intern.h.

◆ COORD_TO_LOCATION

#define COORD_TO_LOCATION (   region,
  x,
  y,
  z,
  north,
  east,
  top 
)
Value:
{ *east = COL_TO_EASTERN(region, x) *north = \
ROW_TO_NORTHERN(region, y) *top = DEPTH_TO_TOP(region, z)}
#define COL_TO_EASTERN(region, x)
#define DEPTH_TO_TOP(region, z)
#define x

Definition at line 117 of file raster3d_intern.h.

◆ DEPTH_TO_TOP

#define DEPTH_TO_TOP (   region,
 
)    region->bottom + z * region->tb_res;

Definition at line 116 of file raster3d_intern.h.

◆ EASTERN_TO_COL

#define EASTERN_TO_COL (   east,
  region 
)    (east - region->west) / (region->ew_res);

Definition at line 96 of file raster3d_intern.h.

◆ LOCATION_TO_COORD

#define LOCATION_TO_COORD (   region,
  north,
  east,
  top,
  x,
  y,
 
)
Value:
{ *x = EASTERN_TO_COL(east, region) *y = \
NORTHERN_TO_ROW(north, region) *z = TOP_TO_DEPTH(top, region)}
#define TOP_TO_DEPTH(top, region)
#define EASTERN_TO_COL(east, region)

Definition at line 105 of file raster3d_intern.h.

◆ NORTHERN_TO_ROW

#define NORTHERN_TO_ROW (   north,
  region 
)     (region->north - north) / (region->ns_res);

Definition at line 97 of file raster3d_intern.h.

◆ RASTER3D_HAS_INDEX

#define RASTER3D_HAS_INDEX   1

Definition at line 27 of file raster3d_intern.h.

◆ RASTER3D_IS_CORRECT_TYPE

#define RASTER3D_IS_CORRECT_TYPE (   t)    (((t) == FCELL_TYPE) || ((t) == DCELL_TYPE))

Definition at line 16 of file raster3d_intern.h.

◆ RASTER3D_LONG_LENGTH

#define RASTER3D_LONG_LENGTH   sizeof(long)

Definition at line 9 of file raster3d_intern.h.

◆ RASTER3D_MAX

#define RASTER3D_MAX (   a,
  b 
)    ((a) >= (b) ? (a) : (b))

Definition at line 25 of file raster3d_intern.h.

◆ RASTER3D_MIN

#define RASTER3D_MIN (   a,
  b 
)    ((a) <= (b) ? (a) : (b))

Definition at line 24 of file raster3d_intern.h.

◆ RASTER3D_NO_INDEX

#define RASTER3D_NO_INDEX   0

Definition at line 28 of file raster3d_intern.h.

◆ RASTER3D_NO_XDR

#define RASTER3D_NO_XDR   0 /* Only kept for backward compatibility */

Definition at line 31 of file raster3d_intern.h.

◆ RASTER3D_READ_DATA

#define RASTER3D_READ_DATA   0

Definition at line 19 of file raster3d_intern.h.

◆ RASTER3D_REGION_BOTTOM

#define RASTER3D_REGION_BOTTOM   "Bottom"

Definition at line 79 of file raster3d_intern.h.

◆ RASTER3D_REGION_COLS

#define RASTER3D_REGION_COLS   "nofCols"

Definition at line 81 of file raster3d_intern.h.

◆ RASTER3D_REGION_DEPTHS

#define RASTER3D_REGION_DEPTHS   "nofDepths"

Definition at line 82 of file raster3d_intern.h.

◆ RASTER3D_REGION_EAST

#define RASTER3D_REGION_EAST   "East"

Definition at line 76 of file raster3d_intern.h.

◆ RASTER3D_REGION_EWRES

#define RASTER3D_REGION_EWRES   "e-w resol"

Definition at line 85 of file raster3d_intern.h.

◆ RASTER3D_REGION_NORTH

#define RASTER3D_REGION_NORTH   "North"

Definition at line 74 of file raster3d_intern.h.

◆ RASTER3D_REGION_NSRES

#define RASTER3D_REGION_NSRES   "n-s resol"

Definition at line 86 of file raster3d_intern.h.

◆ RASTER3D_REGION_PROJ

#define RASTER3D_REGION_PROJ   "Proj"

Definition at line 83 of file raster3d_intern.h.

◆ RASTER3D_REGION_ROWS

#define RASTER3D_REGION_ROWS   "nofRows"

Definition at line 80 of file raster3d_intern.h.

◆ RASTER3D_REGION_SOUTH

#define RASTER3D_REGION_SOUTH   "South"

Definition at line 75 of file raster3d_intern.h.

◆ RASTER3D_REGION_TBRES

#define RASTER3D_REGION_TBRES   "t-b resol"

Definition at line 87 of file raster3d_intern.h.

◆ RASTER3D_REGION_TOP

#define RASTER3D_REGION_TOP   "Top"

Definition at line 78 of file raster3d_intern.h.

◆ RASTER3D_REGION_WEST

#define RASTER3D_REGION_WEST   "West"

Definition at line 77 of file raster3d_intern.h.

◆ RASTER3D_REGION_ZONE

#define RASTER3D_REGION_ZONE   "Zone"

Definition at line 84 of file raster3d_intern.h.

◆ RASTER3D_USE_XDR

#define RASTER3D_USE_XDR   1 /* Only kept for backward compatibility */

Definition at line 30 of file raster3d_intern.h.

◆ RASTER3D_VALID_OPERATION

#define RASTER3D_VALID_OPERATION (   o)     (((o) == RASTER3D_WRITE_DATA) || ((o) == RASTER3D_READ_DATA))

Definition at line 21 of file raster3d_intern.h.

◆ RASTER3D_VALID_XDR_OPTION

#define RASTER3D_VALID_XDR_OPTION (   o)     (((o) == RASTER3D_USE_XDR) || ((o) == RASTER3D_NO_XDR))

Definition at line 33 of file raster3d_intern.h.

◆ RASTER3D_WRITE_DATA

#define RASTER3D_WRITE_DATA   1

Definition at line 18 of file raster3d_intern.h.

◆ RASTER3D_XDR_DOUBLE_LENGTH

#define RASTER3D_XDR_DOUBLE_LENGTH
Value:
8 /* Only kept for backward compatibility \
*/

Definition at line 12 of file raster3d_intern.h.

◆ RASTER3D_XDR_FLOAT_LENGTH

#define RASTER3D_XDR_FLOAT_LENGTH   4 /* Only kept for backward compatibility */

Definition at line 14 of file raster3d_intern.h.

◆ RASTER3D_XDR_INT_LENGTH

#define RASTER3D_XDR_INT_LENGTH   4 /* Only kept for backward compatibility */

Definition at line 11 of file raster3d_intern.h.

◆ ROW_TO_NORTHERN

#define ROW_TO_NORTHERN (   region,
 
)    region->north - y * region->ns_res;

Definition at line 115 of file raster3d_intern.h.

◆ TOP_TO_DEPTH

#define TOP_TO_DEPTH (   top,
  region 
)    (top - region->bottom) / (region->tb_res);

Definition at line 99 of file raster3d_intern.h.

Function Documentation

◆ Rast3d_fatal_error()

◆ Rast3d_fatal_error_noargs()

void Rast3d_fatal_error_noargs ( const char *  msg)

Definition at line 63 of file raster3d/error.c.

Variable Documentation

◆ g3d_cache_default

int g3d_cache_default
extern

◆ g3d_cache_max

int g3d_cache_max
extern

Definition at line 68 of file defaults.c.

Referenced by Rast3d_get_cache_limit(), and Rast3d_set_cache_limit().

◆ g3d_do_compression

int g3d_do_compression
extern

Definition at line 65 of file defaults.c.

Referenced by Rast3d_get_compression_mode(), and Rast3d_set_compression_mode().

◆ g3d_error_fun

void(* g3d_error_fun) (const char *) ( const char *  )
extern

Definition at line 72 of file defaults.c.

Referenced by Rast3d_set_error_fun().

◆ g3d_file_type

int g3d_file_type
extern

Definition at line 69 of file defaults.c.

Referenced by Rast3d_get_file_type().

◆ g3d_precision

int g3d_precision
extern

Definition at line 66 of file defaults.c.

Referenced by Rast3d_get_compression_mode(), and Rast3d_set_compression_mode().

◆ g3d_tile_dimension

int g3d_tile_dimension[3]
extern

Definition at line 70 of file defaults.c.

Referenced by Rast3d_get_tile_dimension(), and Rast3d_set_tile_dimension().

◆ g3d_unit_default

char* g3d_unit_default
extern

Definition at line 73 of file defaults.c.

◆ g3d_version

int g3d_version
extern

Definition at line 64 of file defaults.c.

◆ g3d_vertical_unit_default

int g3d_vertical_unit_default
extern

Definition at line 74 of file defaults.c.

◆ g3d_window

RASTER3D_Region g3d_window
extern

Definition at line 8 of file raster3d/window.c.

Referenced by Rast3d_window_ptr().

◆ tmpCompress

void* tmpCompress
extern

Definition at line 11 of file raster3d/header.c.

◆ tmpCompressLength

int tmpCompressLength
extern

Definition at line 12 of file raster3d/header.c.

◆ xdr

void* xdr
extern

Definition at line 13 of file raster3d/header.c.

Referenced by Rast3d_init_fp_xdr().

◆ xdrLength

int xdrLength
extern

Definition at line 14 of file raster3d/header.c.

Referenced by Rast3d_init_fp_xdr().