GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72636
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
d/range.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.h>
#include "raster3d_intern.h"
Include dependency graph for d/range.c:

Go to the source code of this file.

Functions

void Rast3d_range_update_from_tile (RASTER3D_Map *map, const void *tile, int rows, int cols, int depths, int xRedundant, int yRedundant, int zRedundant, int nofNum, int type)
 
 Rast_init_fp_range (drange)
 
 if (fd< 0)
 
 if (bytes_read==0)
 
 if (bytes_read!=2 *RASTER3D_XDR_DOUBLE_LENGTH)
 
 Rast_update_fp_range (dcell1, drange)
 
 Rast_update_fp_range (dcell2, drange)
 
 close (fd)
 
int Rast3d_range_load (RASTER3D_Map *map)
 Loads the range into the range structure of map. More...
 
void Rast3d_range_min_max (RASTER3D_Map *map, double *min, double *max)
 Returns in min and max the minimum and maximum values of the range. More...
 
int Rast3d_range_write (RASTER3D_Map *map)
 Writes the range which is stored in the range structure of map. (This function is invoked automatically when a new file is closed). More...
 
int Rast3d_range_init (RASTER3D_Map *map)
 

Variables

 int
 
int bytes_read = read(fd, xdr_buf, 2 * RASTER3D_XDR_DOUBLE_LENGTH)
 
char xdr_buf [2 *RASTER3D_XDR_DOUBLE_LENGTH]
 
DCELL dcell1
 
DCELL dcell2
 
 fd = -1
 
 return
 

Function Documentation

if ( )

Definition at line 72 of file d/range.c.

References _, and G_warning().

if ( bytes_read  = = 0)

Definition at line 80 of file d/range.c.

References close().

if ( bytes_read!  = 2 * RASTER3D_XDR_DOUBLE_LENGTH)

Definition at line 86 of file d/range.c.

References _, close(), and G_warning().

int Rast3d_range_init ( RASTER3D_Map map)

Definition at line 206 of file d/range.c.

References RASTER3D_Map::range, and Rast_init_fp_range().

Referenced by Rast3d_open_cell_new(), and Rast3d_open_cell_old_no_header().

int Rast3d_range_load ( RASTER3D_Map map)

Loads the range into the range structure of map.

Parameters
mapa pointer to a raster 3D map object
Returns
1 ... if successful 0 ... otherwise.

Definition at line 112 of file d/range.c.

References RASTER3D_Map::fileName, RASTER3D_Map::mapset, RASTER3D_Map::operation, RASTER3D_Map::range, and RASTER3D_WRITE_DATA.

Referenced by open_g3d_file().

void Rast3d_range_min_max ( RASTER3D_Map map,
double *  min,
double *  max 
)

Returns in min and max the minimum and maximum values of the range.

Parameters
mapa pointer to a raster 3D map object
mina pointer to a double to store minumim
maxa pointer to a double to store maximum

Definition at line 135 of file d/range.c.

References RASTER3D_Map::range, and Rast_get_fp_range_min_max().

Referenced by open_g3d_file(), and Rast3d_print_header().

void Rast3d_range_update_from_tile ( RASTER3D_Map map,
const void *  tile,
int  rows,
int  cols,
int  depths,
int  xRedundant,
int  yRedundant,
int  zRedundant,
int  nofNum,
int  type 
)
int Rast3d_range_write ( RASTER3D_Map map)

Writes the range which is stored in the range structure of map. (This function is invoked automatically when a new file is closed).

Parameters
map
Returns
1 ... if successful 0 ... otherwise.

Definition at line 189 of file d/range.c.

References RASTER3D_Map::fileName, GPATH_MAX, RASTER3D_Map::mapset, RASTER3D_Map::range, Rast3d_error(), Rast3d_filename(), and RASTER3D_RANGE_ELEMENT.

Rast_init_fp_range ( drange  )
Rast_update_fp_range ( dcell1  ,
drange   
)
Rast_update_fp_range ( dcell2  ,
drange   
)

Variable Documentation

bytes_read = read(fd, xdr_buf, 2 * RASTER3D_XDR_DOUBLE_LENGTH)

Definition at line 63 of file d/range.c.

Definition at line 65 of file d/range.c.

Referenced by Rast_read_fp_range(), and Rast_read_rstats().

Definition at line 65 of file d/range.c.

Referenced by Rast_read_fp_range(), and Rast_read_rstats().

fd = -1

Definition at line 69 of file d/range.c.

Referenced by ami_single_temp_name(), AMI_STREAM< T >::AMI_STREAM(), create_raster(), db_read_dbmscap(), dig_spidx_free_areas(), dig_spidx_free_isles(), dig_spidx_free_lines(), dig_spidx_free_nodes(), dig_spidx_init(), G_debug(), G_fopen_append(), G_fopen_append_misc(), G_fopen_modify(), G_fopen_modify_misc(), G_fopen_new(), G_fopen_new_misc(), G_fopen_old(), G_fopen_old_misc(), G_myname(), G_open_update(), G_open_update_misc(), G_put_element_window(), G_read_datum_table(), G_read_ellipsoid_table(), G_read_vector_timestamp(), G_recursive_copy(), G_write_vector_timestamp(), GPJ_get_datum_transform_by_name(), Gs_get_cat_label(), I_fopen_group_file_append(), I_fopen_group_file_new(), I_fopen_group_file_old(), I_fopen_signature_file_new(), I_fopen_signature_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), I_fopen_subgroup_file_append(), I_fopen_subgroup_file_new(), I_fopen_subgroup_file_old(), I_fopen_subgroup_ref_old(), I_get_control_points(), I_get_group(), I_get_group_title(), I_get_subgroup(), I_get_target(), I_put_control_points(), I_put_group(), I_put_group_title(), I_put_subgroup(), I_put_target(), M_read_list(), Rast3d_parse_vallist(), Rast3d_write_cats(), Rast3d_write_colors(), Rast__check_format(), Rast__close_null(), Rast__create_window_mapping(), Rast__open_null_write(), Rast__open_old(), Rast__quant_export(), Rast__quant_import(), Rast__read_colors(), Rast__read_null_bits(), Rast__read_null_row_ptrs(), Rast__read_row_ptrs(), Rast__write_null_bits(), Rast__write_null_row_ptrs(), Rast__write_row_ptrs(), Rast_close(), Rast_get_cell_title(), Rast_get_map_type(), Rast_get_null_value_row(), Rast_get_reclass(), Rast_is_reclass(), Rast_is_reclassed_to(), Rast_open_old(), Rast_put_reclass(), Rast_read_fp_range(), Rast_read_histogram(), Rast_read_range(), Rast_read_rstats(), Rast_row_repeat_nomask(), Rast_set_quant_rules(), Rast_unopen(), Rast_write_colors(), Rast_write_fp_range(), Rast_write_rstats(), read_datum_table(), read_ellipsoid_table(), Rowio_setup(), RTreeCreateTree(), seg_seek_fast(), seg_seek_slow(), Segment_init(), Vect_break_polygons_file(), Vect_save_frmt(), Vect_write_colors(), and Vect_write_dblinks().

int
Initial value:
{
int fd
fd
Definition: d/range.c:69

Definition at line 61 of file d/range.c.

return

Definition at line 98 of file d/range.c.