GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | G_is_reclass (const char *name, const char *mapset, char *rname, char *rmapset) |
reclass file? More... | |
int | G_is_reclassed_to (const char *name, const char *mapset, int *nrmaps, char ***rmaps) |
get child reclass maps list More... | |
int | G_get_reclass (const char *name, const char *mapset, struct Reclass *reclass) |
int | G_free_reclass (struct Reclass *reclass) |
int | G_put_reclass (const char *name, const struct Reclass *reclass) |
int G_free_reclass | ( | struct Reclass * | reclass | ) |
int G_get_reclass | ( | const char * | name, |
const char * | mapset, | ||
struct Reclass * | reclass | ||
) |
Definition at line 117 of file reclass.c.
References fclose(), fd, G_warning(), NULL, and stat.
Referenced by G__open_cell_old().
int G_is_reclass | ( | const char * | name, |
const char * | mapset, | ||
char * | rname, | ||
char * | rmapset | ||
) |
reclass file?
This function determines if the raster map name in mapset is a reclass file. If it is, then the name and mapset of the referenced raster map are copied into the r_name and r_mapset buffers. Returns 1 if name is a reclass file, 0 if it is not, and -1 if there was a problem reading the raster header for name.
name | |
mapset | |
r_name | |
r_mapset |
Definition at line 30 of file reclass.c.
References fclose(), fd, NULL, and dialogs::type.
Referenced by G__mask_info(), and G_get_cellhd().
get child reclass maps list
This function generates a child reclass maps list from the cell_misc/reclassed_to file which stores this list. The cell_misc/reclassed_to file is written by G_put_reclass(). G_is_reclassed_to() is used by g.rename, g.remove and r.reclass to prevent accidentally deleting the parent map of a reclassed raster map.
name | |
mapset | |
nrmaps | |
rmaps |
Definition at line 66 of file reclass.c.
References buf2, fclose(), fd, G_fopen_old_misc(), l, and NULL.
int G_put_reclass | ( | const char * | name, |
const struct Reclass * | reclass | ||
) |
Definition at line 227 of file reclass.c.
References buf2, fclose(), fd, G__file_name_misc(), G_fatal_error(), G_free(), G_fully_qualified_name(), G_getl2(), G_is_c_null_value(), G_mapset(), G_warning(), max, min, NULL, and xname.