GRASS Programmer's Manual  6.4.2(2012)
 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.
int G3d_readCats (const char *name, const char *mapset, struct Categories *pcats)
 Reads the categories file for map name in mapset and stores the categories in the pcats structure. See G_read_cats (Raster_Category_File) for details and return values.

Function Documentation

int G3d_readCats ( const char *  name,
const char *  mapset,
struct Categories *  pcats 
)

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

Parameters:
name
mapset
pcats
Returns:
int

Definition at line 193 of file g3dcats.c.

References G_warning(), and gui_modules.psmap_dialogs::type.

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 G__name_is_fully_qualified(), G_fopen_new(), G_get_ith_d_raster_cat(), G_quant_nof_rules(), G_trim_decimal(), and NULL.