GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71790
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
headerinfo.c File Reference
#include <grass/raster3d.h>
#include "raster3d_intern.h"
Include dependency graph for headerinfo.c:

Go to the source code of this file.

Functions

void Rast3d_get_coords_map (RASTER3D_Map *map, int *rows, int *cols, int *depths)
 Returns the size of the region of map in cells. More...
 
void Rast3d_get_coords_map_window (RASTER3D_Map *map, int *rows, int *cols, int *depths)
 
void Rast3d_get_nof_tiles_map (RASTER3D_Map *map, int *nx, int *ny, int *nz)
 Returns the dimensions of the tile-cube used to tile the region of map. These numbers include partial tiles. More...
 
void Rast3d_get_region_map (RASTER3D_Map *map, double *north, double *south, double *east, double *west, double *top, double *bottom)
 Returns the size of the region. More...
 
void Rast3d_get_window_map (RASTER3D_Map *map, double *north, double *south, double *east, double *west, double *top, double *bottom)
 
void Rast3d_get_region_struct_map (RASTER3D_Map *map, RASTER3D_Region *region)
 Returns in region the region of map. More...
 
void Rast3d_getWindowStructMap (RASTER3D_Map *map, RASTER3D_Region *window)
 
void Rast3d_get_tile_dimensions_map (RASTER3D_Map *map, int *x, int *y, int *z)
 Returns the tile dimensions used for map. More...
 
int Rast3d_tile_type_map (RASTER3D_Map *map)
 Returns the type in which tiles of map are stored in memory. More...
 
void Rast3d_set_unit (RASTER3D_Map *map, const char *unit)
 Set the data unit defintiong. More...
 
void Rast3d_set_vertical_unit2 (RASTER3D_Map *map, int vertical_unit)
 set Vertical unit from integer value defined in gis.h (U_METERS, ...) More...
 
void Rast3d_set_vertical_unit (RASTER3D_Map *map, const char *vertical_unit)
 set Vertical unit from string More...
 
const char * Rast3d_get_unit (RASTER3D_Map *map)
 Return the data unit definition of map. More...
 
int Rast3d_get_vertical_unit2 (RASTER3D_Map *map)
 Returns the vertical unit of map as integer. Units are defined in gis.h. More...
 
const char * Rast3d_get_vertical_unit (RASTER3D_Map *map)
 Return the name of the unit of map. Units are defined in gis.h. More...
 
int Rast3d_file_type_map (RASTER3D_Map *map)
 Returns the type with which tiles of map are stored on file. More...
 
int Rast3d_tile_precision_map (RASTER3D_Map *map)
 Returns the precision used to store map. More...
 
int Rast3d_tile_use_cache_map (RASTER3D_Map *map)
 Returns 1 if map uses cache, returns 0 otherwise. More...
 
void Rast3d_print_header (RASTER3D_Map *map)
 Prints the header information of map. More...
 

Function Documentation

int Rast3d_file_type_map ( RASTER3D_Map map)

Returns the type with which tiles of map are stored on file.

Parameters
map
Returns
int

Definition at line 281 of file headerinfo.c.

References RASTER3D_Map::type.

Referenced by open_g3d_file(), Rast3d_change_type(), Rast3d_make_aligned_volume_file(), and Rast3d_retile().

void Rast3d_get_coords_map ( RASTER3D_Map map,
int rows,
int cols,
int depths 
)

Returns the size of the region of map in cells.

Parameters
map
rows
cols
depths
Returns
void

Definition at line 19 of file headerinfo.c.

References RASTER3D_Region::cols, RASTER3D_Region::depths, RASTER3D_Map::region, and RASTER3D_Region::rows.

Referenced by Rast3d_compare_files(), Rast3d_flush_tiles_in_cube(), Rast3d_retile(), and Rast3d_write_ascii().

void Rast3d_get_coords_map_window ( RASTER3D_Map map,
int rows,
int cols,
int depths 
)
void Rast3d_get_nof_tiles_map ( RASTER3D_Map map,
int nx,
int ny,
int nz 
)

Returns the dimensions of the tile-cube used to tile the region of map. These numbers include partial tiles.

Parameters
map
nx
ny
nz
Returns
void

Definition at line 51 of file headerinfo.c.

References RASTER3D_Map::nx, RASTER3D_Map::ny, and RASTER3D_Map::nz.

Referenced by Rast3d_change_precision(), Rast3d_change_type(), and Rast3d_compare_files().

void Rast3d_get_region_map ( RASTER3D_Map map,
double *  north,
double *  south,
double *  east,
double *  west,
double *  top,
double *  bottom 
)

Returns the size of the region.

Parameters
map
north
south
east
west
top
bottom
Returns
void

Definition at line 77 of file headerinfo.c.

References RASTER3D_Region::bottom, RASTER3D_Region::east, RASTER3D_Region::north, RASTER3D_Map::region, RASTER3D_Region::south, RASTER3D_Region::top, and RASTER3D_Region::west.

void Rast3d_get_region_struct_map ( RASTER3D_Map map,
RASTER3D_Region region 
)

Returns in region the region of map.

Parameters
map
region
Returns
void

Definition at line 115 of file headerinfo.c.

References Rast3d_region_copy(), and RASTER3D_Map::region.

Referenced by Rast3d_change_precision(), Rast3d_change_type(), Rast3d_mask_open_old(), and Rast3d_retile().

void Rast3d_get_tile_dimensions_map ( RASTER3D_Map map,
int x,
int y,
int z 
)

Returns the tile dimensions used for map.

Parameters
map
x
y
z
Returns
void

Definition at line 142 of file headerinfo.c.

References RASTER3D_Map::tileX, RASTER3D_Map::tileY, and RASTER3D_Map::tileZ.

Referenced by Rast3d_change_precision(), Rast3d_change_type(), Rast3d_compare_files(), and Rast3d_mask_tile().

const char* Rast3d_get_unit ( RASTER3D_Map map)

Return the data unit definition of map.

Parameters
map
Returns
int

Definition at line 228 of file headerinfo.c.

References RASTER3D_Map::unit.

const char* Rast3d_get_vertical_unit ( RASTER3D_Map map)

Return the name of the unit of map. Units are defined in gis.h.

Vertical units may have temporal type

Parameters
map
Returns
int

Definition at line 264 of file headerinfo.c.

References G_get_units_name(), and RASTER3D_Map::vertical_unit.

int Rast3d_get_vertical_unit2 ( RASTER3D_Map map)

Returns the vertical unit of map as integer. Units are defined in gis.h.

Vertical units may have temporal type

Parameters
map
Returns
int

Definition at line 246 of file headerinfo.c.

References RASTER3D_Map::vertical_unit.

void Rast3d_get_window_map ( RASTER3D_Map map,
double *  north,
double *  south,
double *  east,
double *  west,
double *  top,
double *  bottom 
)
void Rast3d_getWindowStructMap ( RASTER3D_Map map,
RASTER3D_Region window 
)

Definition at line 122 of file headerinfo.c.

References Rast3d_region_copy(), and RASTER3D_Map::window.

void Rast3d_set_unit ( RASTER3D_Map map,
const char *  unit 
)

Set the data unit defintiong.

Parameters
map
unit
Returns
void

Definition at line 178 of file headerinfo.c.

References G_store(), and RASTER3D_Map::unit.

void Rast3d_set_vertical_unit ( RASTER3D_Map map,
const char *  vertical_unit 
)

set Vertical unit from string

Parameters
map
unit
Returns
void

Definition at line 212 of file headerinfo.c.

References G_units(), and RASTER3D_Map::vertical_unit.

void Rast3d_set_vertical_unit2 ( RASTER3D_Map map,
int  vertical_unit 
)

set Vertical unit from integer value defined in gis.h (U_METERS, ...)

Parameters
map
unit
Returns
void

Definition at line 195 of file headerinfo.c.

References RASTER3D_Map::vertical_unit.

int Rast3d_tile_precision_map ( RASTER3D_Map map)

Returns the precision used to store map.

Parameters
map
Returns
int

Definition at line 298 of file headerinfo.c.

References RASTER3D_Map::precision.

Referenced by Rast3d_compare_files().

int Rast3d_tile_type_map ( RASTER3D_Map map)

Returns the type in which tiles of map are stored in memory.

Parameters
map
Returns
int

Definition at line 161 of file headerinfo.c.

References RASTER3D_Map::typeIntern.

Referenced by N_read_rast3d_to_array_3d(), Rast3d_change_precision(), Rast3d_change_type(), Rast3d_compare_files(), Rast3d_retile(), and Rast3d_write_ascii().

int Rast3d_tile_use_cache_map ( RASTER3D_Map map)

Returns 1 if map uses cache, returns 0 otherwise.

Parameters
map
Returns
int

Definition at line 315 of file headerinfo.c.

References RASTER3D_Map::useCache.

Referenced by Rast3d_compare_files(), and Rast3d_retile().