GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3drange.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <grass/gis.h>
#include "G3d_intern.h"
Include dependency graph for g3drange.c:

Go to the source code of this file.

Functions

void G3d_range_updateFromTile (G3D_Map *map, const void *tile, int rows, int cols, int depths, int xRedundant, int yRedundant, int zRedundant, int nofNum, int type)
 
 G_init_fp_range (drange)
 
 if (G__name_is_fully_qualified(name, xname, xmapset))
 
 sprintf (buf2,"%s", G3D_RANGE_ELEMENT)
 
 if (G_find_file2(buf, buf2, mapset))
 
 G_warning ("can't read range file for [%s in %s]", name, mapset)
 
int G3d_range_load (G3D_Map *map)
 Loads the range into the range structure of map. More...
 
void G3d_range_min_max (G3D_Map *map, double *min, double *max)
 Returns in min and max the minimum and maximum values of the range. More...
 
int G3d_range_write (G3D_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 G3d_range_init (G3D_Map *map)
 

Variables

 int
 
char xname [GNAME_MAX]
 
char xmapset [GMAPSET_MAX]
 
char buf [GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
 
char buf2 [GMAPSET_MAX+sizeof(G3D_RANGE_ELEMENT)+2]
 
char xdr_buf [100]
 
DCELL dcell1
 
DCELL dcell2
 
XDR xdr_str
 
 fd = -1
 
 else
 
error __pad0__
 
 return
 

Function Documentation

int G3d_range_init ( G3D_Map *  map)

Definition at line 235 of file g3drange.c.

References G_init_fp_range().

Referenced by G3d_openCellNew(), and G3d_openCellOldNoHeader().

int G3d_range_load ( G3D_Map *  map)

Loads the range into the range structure of map.

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

Definition at line 123 of file g3drange.c.

References G3D_WRITE_DATA.

Referenced by open_g3d_file().

void G3d_range_min_max ( G3D_Map *  map,
double *  min,
double *  max 
)

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

Parameters
map
min
max
Returns
void

Definition at line 149 of file g3drange.c.

References G_get_fp_range_min_max().

Referenced by G3d_printHeader(), and open_g3d_file().

void G3d_range_updateFromTile ( G3D_Map *  map,
const void *  tile,
int  rows,
int  cols,
int  depths,
int  xRedundant,
int  yRedundant,
int  zRedundant,
int  nofNum,
int  type 
)
int G3d_range_write ( G3D_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 218 of file g3drange.c.

References G3d_error(), and G3d_filename().

G_init_fp_range ( drange  )

Referenced by G3d_range_init(), and G_read_fp_range().

G_warning ( "can't read range file for [%s in%s],
name  ,
mapset   
)

Definition at line 72 of file g3drange.c.

References buf2, and sprintf().

if ( G_find_file2(buf, buf2, mapset)  )

Definition at line 81 of file g3drange.c.

References buf2, G3D_XDR_DOUBLE_LENGTH, G_open_old(), and G_update_fp_range().

sprintf ( buf2  ,
"%s"  ,
G3D_RANGE_ELEMENT   
)

Variable Documentation

error __pad0__

Definition at line 105 of file g3drange.c.

char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]

Definition at line 62 of file g3drange.c.

Referenced by _viewcell_tri_interp(), BM_file_read(), clean_dir(), db__copy_table(), db_convert_value_datetime_into_string(), db_convert_value_to_string(), db_create_index2(), db_double_quote_string(), db_legal_tablename(), db_print_error(), db_read_dbmscap(), db_select_CatValArray(), db_select_int(), db_select_value(), db_set_default_connection(), db_sqltype_name(), db_table_exists(), db_table_to_sql(), dfread_header(), dig__read_head(), dig__write_head(), dig_Rd_Plus_head(), dig_Rd_spindx_head(), dig_read_cidx_head(), dig_Wr_Plus_head(), dig_Wr_spindx_head(), dig_write_cidx_head(), F_generate(), G3d_makeMapsetMapDirectory(), G3d_malloc(), G3d_maskFileExists(), G3d_openCellOldNoHeader(), G3d_removeColor(), G3d_writeCats(), G3d_writeHistory(), G__calloc(), G__home(), G__make_mapset_element_misc(), G__malloc(), G__oldsite_get(), G__read_Cell_head(), G__read_Cell_head_array(), G__read_row_ptrs(), G__read_timestamp(), G__realloc(), G__write_Cell_head(), G__write_Cell_head3(), G__write_row_ptrs(), G__write_timestamp(), G_available_mapsets(), G_database_units_to_meters_factor(), G_fread_key_value(), G_get_cellhd(), G_get_raster_sample_bilinear(), G_get_raster_sample_cubic(), G_get_raster_sample_nearest(), G_list(), G_oldsite_describe(), G_put_cell_title(), G_put_cellhd(), G_putenv(), G_quantize_fp_map(), G_quantize_fp_map_range(), G_read_color_rule(), G_read_colors(), G_read_fp_range(), G_read_histogram(), G_read_range(), G_recursive_copy(), G_round_fp_map(), G_site_format(), G_site_put_head(), G_store(), G_str_to_color(), G_trim_decimal(), G_truncate_fp_map(), G_unctrl(), G_write_fp_range(), G_write_quant(), G_write_range(), gpd_2dsite(), GPJ_get_datum_transform_by_name(), GPJ_set_csv_loc(), Gs_get_cat_label(), gs_los_intersect(), gs_los_intersect1(), GS_write_tif(), gsbm_zero_mask(), hit_return(), I_list_group(), I_list_groups(), I_list_subgroup(), I_list_subgroups(), IL_check_at_points_2d(), main(), make_location(), NetA_init_timetable_from_db(), parse_freetypecap(), printfile(), read_coor(), read_datum_table(), read_ellipsoid_table(), read_file(), S_read(), set_proj_lib(), submit(), V1_open_new_nat(), V1_open_old_nat(), V2_close_ogr(), V2_open_old_ogr(), V__trim_decimal(), Vect__init_head(), Vect__open_old(), Vect__write_head(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_default_field_info(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), Vect_hist_command(), Vect_hist_copy(), Vect_legal_filename(), Vect_open_new(), Vect_open_spatial_index(), Vect_open_topo(), Vect_read_dblinks(), Vect_save_spatial_index(), Vect_save_topo(), Vect_str_to_cat_list(), Vect_subst_var(), and Vect_write_dblinks().

char buf2[GMAPSET_MAX+sizeof(G3D_RANGE_ELEMENT)+2]

Definition at line 62 of file g3drange.c.

DCELL dcell1

Definition at line 65 of file g3drange.c.

Referenced by G_read_fp_range().

DCELL dcell2

Definition at line 65 of file g3drange.c.

Referenced by G_read_fp_range().

else
Initial value:
{
sprintf(buf, "%s/%s", G3D_DIRECTORY, name)
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
string name
Definition: render.py:1314
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
Definition: g3drange.c:62

Definition at line 76 of file g3drange.c.

fd = -1

Definition at line 70 of file g3drange.c.

int
Initial value:
{
int fd
FILE * fd
Definition: g3dcolor.c:368

Definition at line 59 of file g3drange.c.

return

Definition at line 107 of file g3drange.c.

char xdr_buf[100]

Definition at line 64 of file g3drange.c.

Referenced by G_read_fp_range(), and G_write_fp_range().

XDR xdr_str

Definition at line 66 of file g3drange.c.

Referenced by G_read_fp_range(), and G_write_fp_range().

char xmapset[GMAPSET_MAX]

Definition at line 61 of file g3drange.c.

char xname[GNAME_MAX]

Definition at line 61 of file g3drange.c.