1 #ifndef RASTER3D_INTERN_H 2 #define RASTER3D_INTERN_H 9 #define RASTER3D_LONG_LENGTH sizeof (long) 11 #define RASTER3D_XDR_INT_LENGTH 4 12 #define RASTER3D_XDR_DOUBLE_LENGTH 8 13 #define RASTER3D_XDR_FLOAT_LENGTH 4 15 #define RASTER3D_IS_CORRECT_TYPE(t) (((t) == FCELL_TYPE) || ((t) == DCELL_TYPE)) 17 #define RASTER3D_WRITE_DATA 1 18 #define RASTER3D_READ_DATA 0 20 #define RASTER3D_VALID_OPERATION(o) \ 21 (((o) == RASTER3D_WRITE_DATA) || ((o) == RASTER3D_READ_DATA)) 23 #define RASTER3D_MIN(a,b) ((a) <= (b) ? (a) : (b)) 24 #define RASTER3D_MAX(a,b) ((a) >= (b) ? (a) : (b)) 26 #define RASTER3D_HAS_INDEX 1 27 #define RASTER3D_NO_INDEX 0 29 #define RASTER3D_USE_XDR 1 30 #define RASTER3D_NO_XDR 0 32 #define RASTER3D_VALID_XDR_OPTION(o) (((o) == RASTER3D_USE_XDR) || ((o) == RASTER3D_NO_XDR)) 69 #define RASTER3D_REGION_NORTH "North" 70 #define RASTER3D_REGION_SOUTH "South" 71 #define RASTER3D_REGION_EAST "East" 72 #define RASTER3D_REGION_WEST "West" 73 #define RASTER3D_REGION_TOP "Top" 74 #define RASTER3D_REGION_BOTTOM "Bottom" 75 #define RASTER3D_REGION_ROWS "nofRows" 76 #define RASTER3D_REGION_COLS "nofCols" 77 #define RASTER3D_REGION_DEPTHS "nofDepths" 78 #define RASTER3D_REGION_PROJ "Proj" 79 #define RASTER3D_REGION_ZONE "Zone" 80 #define RASTER3D_REGION_EWRES "e-w resol" 81 #define RASTER3D_REGION_NSRES "n-s resol" 82 #define RASTER3D_REGION_TBRES "t-b resol" 91 #define EASTERN_TO_COL(east, region) (east - region->west) / (region->ew_res); 92 #define NORTHERN_TO_ROW(north, region) (region->north - north) / (region->ns_res); 93 #define TOP_TO_DEPTH(top, region) (top - region->bottom) / (region->tb_res); 99 #define LOCATION_TO_COORD(region, north, east, top, x, y, z) \ 101 *x = EASTERN_TO_COL(east, region) \ 102 *y = NORTHERN_TO_ROW(north, region) \ 103 *z = TOP_TO_DEPTH(top, region) \ 111 #define COL_TO_EASTERN(region, x) region->west + x * region->ew_res; 112 #define ROW_TO_NORTHERN(region, y) region->north - y * region->ns_res; 113 #define DEPTH_TO_TOP(region, z) region->bottom + z * region->tb_res; 114 #define COORD_TO_LOCATION(region, x, y, z, north, east, top) \ 116 *east = COL_TO_EASTERN(region, x) \ 117 *north = ROW_TO_NORTHERN(region, y) \ 118 *top = DEPTH_TO_TOP(region, z) \
int g3d_tile_dimension[3]
void Rast3d_fatal_error(const char *,...)
Prints fatal error message.
int g3d_vertical_unit_default
RASTER3D_Region g3d_window
void Rast3d_fatal_error_noargs(const char *)
void(* g3d_error_fun)(const char *)