GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
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

◆ Rast3d_file_type_map()

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.

◆ Rast3d_get_coords_map()

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(), and Rast3d_write_ascii().

◆ Rast3d_get_coords_map_window()

void Rast3d_get_coords_map_window ( RASTER3D_Map map,
int *  rows,
int *  cols,
int *  depths 
)

◆ Rast3d_get_nof_tiles_map()

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_compare_files().

◆ Rast3d_get_region_map()

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.

◆ Rast3d_get_region_struct_map()

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.

◆ Rast3d_get_tile_dimensions_map()

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_compare_files().

◆ Rast3d_get_unit()

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.

◆ Rast3d_get_vertical_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.

◆ Rast3d_get_vertical_unit2()

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.

◆ Rast3d_get_window_map()

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

◆ Rast3d_getWindowStructMap()

void Rast3d_getWindowStructMap ( RASTER3D_Map map,
RASTER3D_Region window 
)

Definition at line 122 of file headerinfo.c.

◆ Rast3d_print_header()

◆ Rast3d_set_unit()

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.

◆ Rast3d_set_vertical_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.

◆ Rast3d_set_vertical_unit2()

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.

◆ Rast3d_tile_precision_map()

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().

◆ Rast3d_tile_type_map()

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 Rast3d_compare_files(), and Rast3d_write_ascii().

◆ Rast3d_tile_use_cache_map()

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().