|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|

Go to the source code of this file.
add file name to Ref structure
This routine adds the file name and mapset to the list contained in the ref structure, if it is not already in the list. The ref structure must have been properly initialized. This routine is used by programs, such as i.maxlik, to add to the group new raster maps created from files already in the group. Returns the index into the file array within the ref structure for the file after insertion; see Imagery_Library_Data_Structures.
| name | |
| mapset | |
| ref |
Definition at line 380 of file group.c.
References G_malloc, G_realloc, Ref_Files::mapset, AMI_STREAM< T >::name(), name, and strcpy.
Referenced by I_transfer_group_ref_file().
free Ref structure
This routine frees memory allocated to the ref structure.
| ref |
Definition at line 475 of file group.c.
References free().
Referenced by I_iclass_init_group().
Definition at line 37 of file group.c.
References G_fopen_old(), G_mapset(), G_suppress_warnings(), GROUPFILE, and NULL.
read group REF file
Reads the contents of the REF file for the specified group into the ref structure. Returns 1 if successful; 0 otherwise (but no error messages are printed).
| group | |
| ref |
Definition at line 111 of file group.c.
References NULL.
Referenced by I_iclass_init_group().
Definition at line 67 of file group.c.
References G_suppress_warnings(), I_find_group(), I_fopen_group_file_old(), NULL, and SUBGROUPFILE.
read subgroup REF file
Reads the contents of the REF file for the specified subgroup of the specified group into the ref structure. Returns 1 if successful; 0 otherwise (but no error messages are printed).
| group | |
| subgroup | |
| ref |
Definition at line 146 of file group.c.
References NULL.
Referenced by I_iclass_init_group().
initialize Ref structure
This routine initializes the ref structure for other library calls which require a Ref structure. This routine must be called before any use of the structure can be made. Note. The routines I_get_group_ref and I_get_subgroup_ref call this routine automatically.
| ref |
Definition at line 458 of file group.c.
References NULL.
Referenced by I_iclass_init_group().
Definition at line 54 of file group.c.
References G_fopen_new(), GROUPFILE, and NULL.
write group REF file
Writes the contents of the ref structure to the REF file for the specified group. Returns 1 if successful; 0 otherwise (and prints a diagnostic error). Note. This routine will create the group, if it does not already exist.
| group | |
| ref |
Definition at line 86 of file group.c.
References I_find_group(), I_fopen_group_file_new(), NULL, and SUBGROUPFILE.
write subgroup REF file
Writes the contents of the ref structure into the REF file for the specified subgroup of the specified group. Returns 1 if successful; 0 otherwise (and prints a diagnostic error). Note. This routine will create the subgroup, if it does not already exist.
| group | |
| subgroup | |
| ref |
copy Ref lists
This routine is used to copy file names from one Ref structure to another. The name and mapset for file n from the src structure are copied into the dst structure (which must be properly initialized). For example, the following code copies one Ref structure to another:
This routine is used by g.gui.gcp to create the REF file for a subgroup.
| ref2 | Source |
| n | |
| ref1 | Destination |
Definition at line 427 of file group.c.
References I_add_file_to_group_ref(), and AMI_STREAM< T >::name().