GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dcats.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 g3dcats.c:

Go to the source code of this file.

Functions

int G3d_writeCats (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 G_write_cats (Raster_Category_File) for details and return values. More...
 
 if (G__name_is_fully_qualified(name, xname, xmapset))
 
 sprintf (buf2,"%s", G3D_CATS_ELEMENT)
 
 if (!fd=G_fopen_old(buff, buf2, mapset))
 
 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]
 
char buf2 [200]
 
char xname [512]
 
char xmapset [512]
 
CELL cat
 
DCELL val1
 
DCELL val2
 
int old
 
long num = -1
 
 else
 
 return
 
error __pad0__
 

Function Documentation

fclose ( fd  )

Referenced by bin_install(), check_dependencies(), check_extension(), db_read_dbmscap(), db_shutdown_driver(), depstr(), deregister_entries_gisman(), deregister_entries_gisman2(), deregister_extension(), deregister_html(), dump_ascii(), dump_html(), dump_plain(), err(), font_exists(), G3d_readHistory(), G3d_writeAscii(), G3d_writeCats(), G3d_writeHistory(), G__get_window(), G__put_window(), G__quant_export(), G__quant_import(), G__raster_misc_read_line(), G__raster_misc_write_line(), G__read_cats(), G__write_cats(), G_ask_datum_name(), G_ask_ellipse_name(), G_ask_proj_name(), G_copy_file(), G_debug(), G_get_3dview(), G_get_cell_title(), G_get_cellhd(), G_get_dig_title(), G_get_gdal_link(), G_get_reclass(), G_is_reclass(), G_is_reclassed_to(), G_myname(), G_put_3dview(), G_put_cell_title(), G_put_cellhd(), G_put_reclass(), G_read_histogram(), G_read_history(), G_read_key_value_file(), G_read_range(), G_vasprintf(), G_write_colors(), G_write_histogram(), G_write_histogram_cs(), G_write_history(), G_write_key_value_file(), G_write_range(), get_package_name(), GK_print_keys(), GPJ_ask_datum_params(), GPJ_get_datum_transform_by_name(), GS_write_ppm(), GS_write_zoom(), I_get_control_points(), I_get_group(), I_get_group_title(), I_get_subgroup(), I_get_target(), I_list_groups(), I_list_subgroups(), I_put_control_points(), I_put_group(), I_put_group_title(), I_put_subgroup(), I_put_target(), list_extensions(), main(), make_location(), make_mapset(), parse_freetypecap(), PS_Graph_close(), R_parse_monitorcap(), read_bmp(), read_datum_table(), read_ellipsoid_table(), read_file(), read_pgm(), read_png(), read_ppm(), register_entries_gisman(), register_entries_gisman2(), register_extension(), register_html(), restore_entries_gisman(), restore_html(), S_read(), SADFClose(), SimpleErrorMessage(), source_install(), su(), test_install(), V1_close_nat(), V1_open_new_nat(), V2_close_ogr(), V2_open_old_ogr(), V__dump_window(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_open_spatial_index(), Vect_open_topo(), Vect_read_dblinks(), Vect_save_spatial_index(), Vect_save_topo(), Vect_write_dblinks(), write_bmp(), write_file(), write_pgm(), write_png(), and write_ppm().

int G3d_writeCats ( 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 G_write_cats (Raster_Category_File) for details and return values.

Parameters
name
cats
Returns
int

Definition at line 26 of file g3dcats.c.

References buf, buf2, fclose(), fd, G__name_is_fully_qualified(), G_fopen_new(), G_get_ith_d_raster_cat(), G_quant_nof_rules(), G_trim_decimal(), NULL, sprintf(), val1, val2, xmapset, and xname.

G_warning ( "category support for in mapset %s"  [%s][%s],
name  ,
mapset  ,
type   
)

Referenced by class_equiprob(), clean_dir(), close_g3d_file(), db__copy_table(), db_delete_table(), db_get_column(), db_get_table_number_of_rows(), db_select_CatValArray(), db_select_int(), db_select_value(), db_start_driver_open_database(), db_table_exists(), db_table_to_sql(), dig__read_head(), dig_add_area(), dig_add_isle(), dig_cidx_del_cat(), dig_del_area(), dig_file_load(), dig_Rd_Plus_head(), dig_Rd_spindx_head(), dig_read_cidx_head(), dig_read_frmt_ascii(), dig_write_plus_file(), E_edit_cellhd(), err(), F_generate(), G3d_readWindow(), G__check_for_auto_masking(), G__check_fp_type(), G__check_gisinit(), G__check_null_bit(), G__open_cell_old(), G__open_null_write(), G__quant_import(), G__random_d_initialize_0(), G__random_f_initialize_0(), G__raster_misc_read_line(), G__raster_misc_write_line(), G__read_row_ptrs(), G__write_fp_format(), G__write_null_bits(), G_adjust_Cell_head(), G_adjust_Cell_head3(), G_ask_colors(), G_ask_datum_name(), G_check_input_output_name(), G_command_history(), G_copy_file(), G_debug(), G_distance_point_to_line_segment(), G_get_3dview(), G_get_cellhd(), G_get_projinfo(), G_get_projunits(), G_get_reclass(), G_is_null_value(), G_math_cholesky_decomposition(), G_math_pivot_create(), G_math_solver_cholesky(), G_open_cell_old(), G_parser(), G_plot_area(), G_plot_polygon(), G_put_3dview(), G_put_cell_title(), G_put_cellhd(), G_put_reclass(), G_quantize_fp_map(), G_quantize_fp_map_range(), G_raster_map_is_fp(), G_raster_map_type(), G_read_colors(), G_read_fp_range(), G_read_histogram(), G_read_history(), G_read_range(), G_read_raster_cats(), G_read_vector_cats(), G_round_fp_map(), G_set_fp_type(), G_set_null_value(), G_set_quant_rules(), G_set_window(), G_site_get(), G_site_get_head(), G_site_put_head(), G_sites_open_new(), G_system(), G_truncate_fp_map(), G_write_fp_range(), G_write_history(), G_write_quant(), G_write_range(), get_command(), gk_make_framesfromkeys(), gk_make_linear_framesfromkeys(), GK_update_frames(), Gp_load_sites(), Gp_set_color(), GPJ_ask_datum_params(), GPJ_get_datum_transform_by_name(), GPJ_grass_to_osr(), GPJ_osr_to_grass(), Gs_build_256lookup(), gs_err(), Gs_get_cat_label(), Gs_load_3dview(), GS_load_att_map(), Gs_loadmap_as_bitmap(), Gs_loadmap_as_char(), Gs_loadmap_as_float(), Gs_loadmap_as_int(), Gs_loadmap_as_short(), gs_malloc_lookup(), Gs_numtype(), Gs_pack_colors(), Gs_pack_colors_float(), gs_put_label(), GS_write_ppm(), GS_write_tif(), GS_write_zoom(), gsd_init_mpeg(), gsd_put_legend(), gsd_rot(), gsd_wall(), gsdrape_set_surface(), Gv_load_vect(), Gvl_load_colors_data(), I_fopen_group_file_append(), I_fopen_group_file_new(), I_fopen_group_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_get_control_points(), I_get_target(), I_put_control_points(), IL_grid_calc_2d(), IL_interp_segments_2d(), IL_output_2d(), IL_vector_input_data_2d(), LIB_main(), wxnviz.Nviz::LoadSurface(), wxnviz.Nviz::LoadVector(), wxnviz.Nviz::LoadVolume(), main(), NetA_init_distinct(), NetA_init_timetable_from_db(), NetA_initialise_varray(), NetA_timetable_shortest_path(), Nviz_color_from_str(), Nviz_new_light(), Nviz_new_map_obj(), Nviz_set_focus_state(), open_g3d_file(), P_popmatrix(), P_pushmatrix(), parse_freetypecap(), pj_do_proj(), pj_do_transform(), pj_get_kv(), pj_get_string(), PNG_color(), process_command(), process_point(), PS_color(), read_coor(), read_datum_table(), read_ellipsoid_table(), read_file(), S_read(), segment_get_row(), segment_init(), segment_intersection_2d(), segment_intersection_2d_tol(), segment_pagein(), segment_pageout(), segment_put_row(), segment_seek(), segment_setup(), SimpleErrorMessage(), submit(), V1_read_next_line_ogr(), V2_close_ogr(), V2_open_old_ogr(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_add_dblink(), Vect_build_line_area(), Vect_build_nat(), Vect_build_ogr(), Vect_check_input_output_name(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_copy_map_lines(), Vect_copy_table_by_cats(), Vect_copy_tables(), Vect_default_field_info(), Vect_delete(), Vect_get_area_points(), Vect_get_area_points_geos(), Vect_get_dblink(), Vect_get_point_in_poly(), Vect_graph_shortest_path(), Vect_isle_find_area(), Vect_legal_filename(), Vect_level(), Vect_line_check_intersection(), Vect_line_segment(), Vect_map_add_dblink(), Vect_map_del_dblink(), Vect_merge_lines(), Vect_net_build_graph(), Vect_net_shortest_path(), Vect_open_new(), Vect_open_topo(), Vect_overlay_and(), Vect_read_dblinks(), Vect_rename(), Vect_save_spatial_index(), Vect_save_topo(), Vect_segment_intersection(), Vect_set_open_level(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_cat_string(), Vect_set_varray_from_db(), Vect_str_to_cat_list(), Vect_write_dblinks(), and Vedit_modify_cats().

Definition at line 95 of file g3dcats.c.

References sprintf().

if ( fd=G_fopen_old(buff, buf2, mapset))

Definition at line 104 of file g3dcats.c.

sprintf ( buf2  ,
"%s"  ,
G3D_CATS_ELEMENT   
)

Referenced by bin_install(), binaries_exist(), check_dependencies(), check_extension(), D_check_map_window(), D_new_window(), D_reset_screen_window(), D_timestamp(), datetime_format(), db__copy_table(), db_convert_value_datetime_into_string(), db_convert_value_to_string(), db_create_index2(), db_dirent(), db_legal_tablename(), db_noproc_error(), db_print_error(), db_procedure_not_implemented(), db_read_dbmscap(), db_set_default_connection(), db_start_driver(), db_syserror(), db_table_to_sql(), DBFCreateLL(), DBFOpenLL(), delete_ext_html(), depstr(), deregister_entries_gisman(), deregister_entries_gisman2(), deregister_extension(), deregister_html(), dump_html(), E_edit_cats(), E_edit_cellhd(), E_edit_fp_cats(), E_edit_history(), ellipsoid_table_file(), exit_db(), exit_tmp(), F_generate(), F_open(), G3d_keySetDouble(), G3d_keySetInt(), G3d_makeMapsetMapDirectory(), G3d_maskFileExists(), G3d_openCellOldNoHeader(), G3d_readHistory(), G3d_removeColor(), G3d_writeCats(), G3d_writeHistory(), G__file_name(), G__file_name_misc(), G__get_window(), G__home(), G__location_path(), G__make_location(), G__make_mapset(), G__make_mapset_element_misc(), G__mapset_permissions2(), G__quant_export(), G__quant_import(), G__tempfile(), G__write_cats(), G_ask_datum_name(), G_ask_ellipse_name(), G_ask_proj_name(), G_available_mapsets(), G_command_history(), G_database_ellipse_name(), G_format_timestamp(), G_fully_qualified_name(), G_get_cellhd(), G_get_datumparams_from_projinfo(), G_get_raster_cat(), G_gishelp(), G_list(), G_llres_scan(), G_mask_info(), G_parser(), G_put_cell_title(), G_put_cellhd(), G_putenv(), G_quantize_fp_map(), G_quantize_fp_map_range(), G_rc_path(), G_read_colors(), G_read_fp_range(), G_read_range(), G_recursive_copy(), G_remove_colors(), G_round_fp_map(), G_short_history(), G_site_format(), G_truncate_fp_map(), G_unctrl(), G_write_colors(), G_write_fp_range(), G_write_quant(), G_write_range(), get_configure_options(), get_package_name(), GPJ_ask_datum_params(), GPJ_get_datum_transform_by_name(), GPJ_get_equivalent_latlong(), GPJ_osr_to_grass(), GS_get_cat_at_xy(), Gs_get_cat_label(), GS_get_val_at_xy(), gsd_put_legend(), gsd_scalebar(), I_cluster_begin(), I_find_subgroup(), I_find_subgroup_file(), 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_list_group(), I_list_subgroup(), I_list_subgroups(), I_location_info(), I_new_signature(), if(), IL_check_at_points_2d(), IL_output_2d(), IL_resample_output_2d(), invent_pad(), list_binaries(), list_extensions(), main(), make_location(), make_mapset(), mkdir_s(), nc_fgets(), nc_fgets_html(), nc_fgets_nb(), NetA_init_timetable_from_db(), new_ext_html(), new_item(), new_submenu(), parse_freetypecap(), pj_get_kv(), pj_get_string(), query_extension(), R_parse_monitorcap(), read_datum_table(), read_ellipsoid_table(), register_entries_gisman(), register_entries_gisman2(), register_extension(), register_html(), restore(), restore_entries_gisman(), restore_html(), run_post(), S_read(), set_proj_lib(), show_details(), show_license(), SHPCreateLL(), SHPOpenLL(), source_clean(), source_install(), su(), submit(), test_install(), uninstall(), unpack_extension(), V1_open_new_nat(), V1_open_old_nat(), V2_close_ogr(), V2_open_old_ogr(), V__dump_window(), V_call(), V_clear(), Vect__init_head(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_cidx_open(), Vect_cidx_save(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_default_field_info(), Vect_delete(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), Vect_get_full_name(), Vect_hist_command(), Vect_legal_filename(), Vect_maptype_info(), Vect_open_new(), Vect_open_spatial_index(), Vect_open_topo(), Vect_read_dblinks(), Vect_save_spatial_index(), Vect_save_topo(), Vect_subst_var(), Vect_write_dblinks(), and wget_extension().

switch ( read_cats(name, mapset, pcats)  )

Definition at line 198 of file g3dcats.c.

Referenced by alloc_slice_buff(), and read_slice().

Variable Documentation

error __pad0__

Definition at line 172 of file g3dcats.c.

else
Initial value:
{
sprintf(buff, "%s/%s", G3D_DIRECTORY, name)
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
string name
Definition: render.py:1314
char buff[1024]
Definition: g3dcats.c:89

Definition at line 99 of file g3dcats.c.

return

Definition at line 169 of file g3dcats.c.

Referenced by gvl_file_set_slices_param().