GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73786
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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   8 /* Only kept for backward compatibility */
 
#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

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

Definition at line 111 of file raster3d_intern.h.

#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 DEPTH_TO_TOP(region, z)
#define ROW_TO_NORTHERN(region, y)
#define x
#define COL_TO_EASTERN(region, x)

Definition at line 114 of file raster3d_intern.h.

Referenced by Rast3d_coord2location().

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

Definition at line 113 of file raster3d_intern.h.

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

Definition at line 91 of file raster3d_intern.h.

#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 NORTHERN_TO_ROW(north, region)
#define x
#define EASTERN_TO_COL(east, region)
#define TOP_TO_DEPTH(top, region)

Definition at line 99 of file raster3d_intern.h.

Referenced by Rast3d_location2coord(), Rast3d_location2coord2(), and Rast3d_location2coord_double().

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

Definition at line 92 of file raster3d_intern.h.

#define RASTER3D_HAS_INDEX   1

Definition at line 26 of file raster3d_intern.h.

Referenced by Rast3d_open_cell_new().

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

Definition at line 15 of file raster3d_intern.h.

Referenced by Rast3d_extern_length(), and Rast3d_length().

#define RASTER3D_LONG_LENGTH   sizeof (long)

Definition at line 9 of file raster3d_intern.h.

Referenced by Rast3d_long_decode(), and Rast3d_long_encode().

#define RASTER3D_MAX (   a,
  b 
)    ((a) >= (b) ? (a) : (b))
#define RASTER3D_MIN (   a,
  b 
)    ((a) <= (b) ? (a) : (b))
#define RASTER3D_NO_INDEX   0

Definition at line 27 of file raster3d_intern.h.

#define RASTER3D_NO_XDR   0 /* Only kept for backward compatibility */
#define RASTER3D_READ_DATA   0
#define RASTER3D_REGION_BOTTOM   "Bottom"

Definition at line 74 of file raster3d_intern.h.

#define RASTER3D_REGION_COLS   "nofCols"

Definition at line 76 of file raster3d_intern.h.

#define RASTER3D_REGION_DEPTHS   "nofDepths"

Definition at line 77 of file raster3d_intern.h.

#define RASTER3D_REGION_EAST   "East"

Definition at line 71 of file raster3d_intern.h.

#define RASTER3D_REGION_EWRES   "e-w resol"

Definition at line 80 of file raster3d_intern.h.

#define RASTER3D_REGION_NORTH   "North"

Definition at line 69 of file raster3d_intern.h.

#define RASTER3D_REGION_NSRES   "n-s resol"

Definition at line 81 of file raster3d_intern.h.

#define RASTER3D_REGION_PROJ   "Proj"

Definition at line 78 of file raster3d_intern.h.

#define RASTER3D_REGION_ROWS   "nofRows"

Definition at line 75 of file raster3d_intern.h.

#define RASTER3D_REGION_SOUTH   "South"

Definition at line 70 of file raster3d_intern.h.

#define RASTER3D_REGION_TBRES   "t-b resol"

Definition at line 82 of file raster3d_intern.h.

#define RASTER3D_REGION_TOP   "Top"

Definition at line 73 of file raster3d_intern.h.

#define RASTER3D_REGION_WEST   "West"

Definition at line 72 of file raster3d_intern.h.

#define RASTER3D_REGION_ZONE   "Zone"

Definition at line 79 of file raster3d_intern.h.

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

Definition at line 29 of file raster3d_intern.h.

Referenced by Rast3d_init_copy_from_xdr(), and Rast3d_init_copy_to_xdr().

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

Definition at line 20 of file raster3d_intern.h.

Referenced by Rast3d_fill_header().

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

Definition at line 32 of file raster3d_intern.h.

Referenced by Rast3d_fill_header().

#define RASTER3D_WRITE_DATA   1
#define RASTER3D_XDR_DOUBLE_LENGTH   8 /* Only kept for backward compatibility */
#define RASTER3D_XDR_FLOAT_LENGTH   4 /* Only kept for backward compatibility */

Definition at line 13 of file raster3d_intern.h.

Referenced by Rast3d_extern_length().

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

Definition at line 11 of file raster3d_intern.h.

Referenced by Rast3d_read_ints(), and Rast3d_write_ints().

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

Definition at line 112 of file raster3d_intern.h.

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

Definition at line 93 of file raster3d_intern.h.

Function Documentation

void Rast3d_fatal_error ( const char *  msg,
  ... 
)
void Rast3d_fatal_error_noargs ( const char *  )

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

References G_fatal_error().

Referenced by Rast3d_init_defaults().

Variable Documentation

int g3d_cache_max
void(* g3d_error_fun)(const char *)

Definition at line 72 of file defaults.c.

Referenced by Rast3d_init_defaults(), and Rast3d_set_error_fun().

int g3d_file_type
int g3d_tile_dimension[3]
char* g3d_unit_default

Definition at line 73 of file defaults.c.

Referenced by Rast3d_init_defaults(), and Rast3d_open_cell_new().

int g3d_version

Definition at line 64 of file defaults.c.

int g3d_vertical_unit_default

Definition at line 74 of file defaults.c.

Referenced by Rast3d_init_defaults(), and Rast3d_open_cell_new().

RASTER3D_Region g3d_window

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

Referenced by Rast3d_window_ptr().

void* tmpCompress

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

Referenced by Rast3d_fill_header().

int tmpCompressLength

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

Referenced by Rast3d_fill_header().

void* xdr
int xdrLength

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

Referenced by Rast3d_init_fp_xdr().