GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71790
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
raster3d/cats.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 "raster3d_intern.h"
Include dependency graph for raster3d/cats.c:

Go to the source code of this file.

Functions

int Rast3d_write_cats (const char *name, struct Categories *cats)
 Writes the categories stored in the cats structure into the categories file for map name in the current mapset. See Rast_write_cats (Raster_Category_File) for details and return values. More...
 
 if (G_getl(buff, sizeof(buff), fd)==0)
 
 for (cat=0;;cat++)
 
 fclose (fd)
 
 switch (read_cats(name, mapset, pcats))
 
 G_warning ("category support for [%s] in mapset [%s] %s", name, mapset, type)
 

Variables

char buff [1024]
 
CELL cat
 
DCELL val1
 
DCELL val2
 
int old
 
long num = -1
 
 return
 
error __pad0__
 
 int
 Reads the categories file for map name in mapset and stores the categories in the pcats structure. See Rast_read_cats (Raster_Category_File) for details and return values. More...
 

Function Documentation

fclose ( fd  )

Referenced by cairo_read_bmp(), cairo_read_ppm(), cairo_read_xid(), cairo_write_bmp(), cairo_write_ppm(), cairo_write_xid(), db_d_append_error(), db_read_dbmscap(), db_shutdown_driver(), err(), G__get_list_of_mapsets(), G_close_option_file(), G_copy_file(), G_debug(), G_get_3dview(), G_get_element_window(), G_myname(), G_popen_close(), G_put_3dview(), G_put_element_window(), G_read_ellipsoid_table(), G_read_key_value_file(), G_read_vector_timestamp(), G_write_key_value_file(), G_write_vector_timestamp(), em_buffer< T, Key >::get_stream(), GK_print_keys(), GPJ_get_datum_transform_by_name(), GS_write_ppm(), GS_write_zoom(), HTML_Graph_close(), I_create_cat_rast(), I_get_control_points(), I_get_group(), I_get_group_title(), I_get_subgroup(), I_get_target(), I_iclass_write_signatures(), I_insert_patch_to_cat_rast(), I_put_control_points(), I_put_group(), I_put_group_title(), I_put_subgroup(), I_put_target(), M_read_list(), main(), parse_fontcap(), PS_Graph_close(), Rast3d_parse_vallist(), Rast3d_write_ascii(), Rast3d_write_cats(), Rast3d_write_colors(), Rast__quant_export(), Rast__quant_import(), Rast__read_colors(), Rast__read_history(), Rast__write_history(), Rast_create_gdal_link(), Rast_get_cell_title(), Rast_get_cellhd(), Rast_get_gdal_link(), Rast_get_reclass(), Rast_is_reclass(), Rast_is_reclassed_to(), Rast_print_colors(), Rast_put_cell_title(), Rast_put_cellhd(), Rast_put_reclass(), Rast_read_histogram(), Rast_read_range(), Rast_write_colors(), Rast_write_histogram(), Rast_write_histogram_cs(), Rast_write_range(), read_bmp(), read_datum_table(), read_ellipsoid_table(), read_pgm(), read_png(), read_ppm(), S_read(), SADFClose(), SimpleErrorMessage(), V1_close_nat(), V1_open_new_nat(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_open_fidx(), Vect_open_sidx(), Vect_open_topo(), Vect_save_fidx(), Vect_save_frmt(), Vect_save_sidx(), Vect_save_topo(), Vect_write_colors(), Vect_write_dblinks(), write_bmp(), write_pgm(), write_png(), write_ppm(), and AMI_STREAM< T >::~AMI_STREAM().

G_warning ( "category support for in mapset %s"  [%s][%s],
name  ,
mapset  ,
type   
)
if ( G_getl(buff, sizeof(buff), fd = = 0)

Definition at line 92 of file raster3d/cats.c.

int Rast3d_write_cats ( const char *  name,
struct Categories cats 
)

Writes the categories stored in the cats structure into the categories file for map name in the current mapset. See Rast_write_cats (Raster_Category_File) for details and return values.

Parameters
name
cats
Returns
int

Definition at line 27 of file raster3d/cats.c.

References Categories::a1, Categories::a2, fclose(), fd, Categories::fmt, G_fopen_new_misc(), G_trim_decimal(), Categories::m1, Categories::m2, NULL, Categories::num, Categories::q, Rast_get_ith_d_cat(), Rast_quant_nof_rules(), RASTER3D_CATS_ELEMENT, RASTER3D_DIRECTORY, Categories::title, val1, and val2.

switch ( read_cats(name, mapset, pcats)  )

Definition at line 182 of file raster3d/cats.c.

Referenced by alloc_slice_buff(), and read_slice().

Variable Documentation

error __pad0__

Definition at line 156 of file raster3d/cats.c.

int
Initial value:
{
const char *type

Reads the categories file for map name in mapset and stores the categories in the pcats structure. See Rast_read_cats (Raster_Category_File) for details and return values.

Parameters
name
mapset
pcats
Returns
int

Definition at line 179 of file raster3d/cats.c.

Referenced by btree_update(), c_quant(), Cairo_begin_raster(), Cdhc_royston(), D_get_a(), db_select_int(), DBFWriteAttributeDirectly(), dfread_header(), dfread_header_old(), dfwrite_header(), dig__fread_port_I(), dig__fwrite_port_I(), dig_fread(), f_rand(), f_shiftru(), free_data_buffs(), G_alloc_imatrix(), G_bz2_compress(), G_is_little_endian(), G_rotate_around_point_int(), G_str_to_color(), get_char_vects(), GS_getlight_position(), Gs_load_3dview(), gs_malloc_lookup(), gsd_coarse_surf_map(), gsd_get_nice_range(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_put_legend(), gsd_set_material(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsds_alloc_typbuff(), gvld_isosurf(), gvld_slice(), html_polygon(), I_id_scatt_to_bands(), I_merge_arrays(), I_new_control_point(), if(), IL_grid_calc_2d(), IL_resample_interp_segments_2d(), IL_vector_input_data_2d(), kdtree_dnn(), kdtree_knn(), kdtree_rnn(), LZ4_compress_generic(), N_gwflow_3d_calc_water_budget(), N_les_integrate_dirichlet_3d(), node_x(), node_y(), Nviz_color_from_str(), Nviz_set_viewpoint_persp(), P_Read_Raster_Region_Map(), P_Read_Vector_Region_Map(), PNG_begin_raster(), PNG_Box(), PNG_draw_point(), PNG_Line_width(), PS_raster(), quad_compare(), quad_divide_data(), Rast3d_compute_optimal_tile_dimension(), Rast3d_flush_all_tiles(), Rast3d_get_volume_a(), Rast3d_location2coord(), Rast3d_location2coord2(), Rast__interpolate_color_rule(), Rast__lookup_colors(), Rast_get_color(), Rast_get_default_color(), Rast_get_null_value_color(), Rast_get_sample_bilinear(), Rast_get_sample_cubic(), Rast_get_sample_nearest(), Rast_make_histogram_log_colors(), Rast_quant_get_cell_value(), Rast_set_d_cat(), rtree_search(), seg_setup(), SHPOpenLL(), SHPRestoreSHX(), slice_calc(), unfl(), V1_read_line_pg(), Vect_array_to_cat_list(), Vect_line_reverse(), Vect_new_varray(), Vect_point_buffer2(), and Vect_str_to_cat_list().

return

Definition at line 89 of file raster3d/cats.c.

Referenced by gvl_file_set_slices_param().