GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
imagery/find.c File Reference
#include <grass/imagery.h>
#include <grass/gis.h>
Include dependency graph for imagery/find.c:

Go to the source code of this file.

Functions

int I_find_group (const char *group)
 does group exist? More...
 
int I_find_group2 (const char *group, const char *mapset)
 Does the group exists? More...
 
int I_find_group_file (const char *group, const char *file)
 Searches for a group file in the current mapset. More...
 
int I_find_group_file2 (const char *group, const char *mapset, const char *file)
 Searches for a group file in the specified mapset. More...
 
int I_find_subgroup (const char *group, const char *subgroup)
 Searches for a subgroup in the current mapset. More...
 
int I_find_subgroup2 (const char *group, const char *subgroup, const char *mapset)
 Searches for a subgroup in specified mapset or any mapset if mapset is not set. More...
 
int I_find_subgroup_file (const char *group, const char *subgroup, const char *file)
 Searches for a subgroup file in the current mapset. More...
 
int I_find_subgroup_file2 (const char *group, const char *subgroup, const char *mapset, const char *file)
 Searches for a subgroup file in the specified mapset. More...
 
int I_find_signature_file (const char *group, const char *subgroup, const char *type, const char *file)
 does signature file exists? More...
 

Function Documentation

◆ I_find_group()

int I_find_group ( const char *  group)

does group exist?

Returns 1 if the specified group exists in the current mapset; 0 otherwise. Use I_find_group2 to search in all or a specific mapset.

Parameters
group
Returns
int 1 if group was found, 0 otherwise

Definition at line 22 of file imagery/find.c.

References G_find_file2(), G_mapset(), and NULL.

Referenced by I_find_group_file(), I_find_subgroup(), I_find_subgroup_file(), I_get_subgroup(), and I_put_subgroup().

◆ I_find_group2()

int I_find_group2 ( const char *  group,
const char *  mapset 
)

Does the group exists?

Finds a group in specified mapset or any mapset if mapset is not set. Internally uses G_find_file2().

Parameters
group
mapset
Returns
int 1 if group was found, 0 otherwise

Definition at line 41 of file imagery/find.c.

References G_find_file2(), and NULL.

Referenced by I_find_group_file2(), I_find_subgroup2(), I_find_subgroup_file2(), and list_subgroups().

◆ I_find_group_file()

int I_find_group_file ( const char *  group,
const char *  file 
)

Searches for a group file in the current mapset.

Parameters
group
file
Returns
int 1 if file was found, 0 otherwise

Definition at line 53 of file imagery/find.c.

References G_find_file2_misc(), G_mapset(), I_find_group(), and NULL.

◆ I_find_group_file2()

int I_find_group_file2 ( const char *  group,
const char *  mapset,
const char *  file 
)

Searches for a group file in the specified mapset.

Parameters
group
file
Returns
int 1 if file was found, 0 otherwise

Definition at line 70 of file imagery/find.c.

References G_find_file2_misc(), I_find_group2(), and NULL.

Referenced by fopen_group_file_old().

◆ I_find_signature_file()

int I_find_signature_file ( const char *  group,
const char *  subgroup,
const char *  type,
const char *  file 
)

does signature file exists?

Returns 1 if the specified signature exists in the specified subgroup; 0 otherwise.

Should be used to check if signature file exists after G_parser run when generating new signature file.

Parameters
group- group where to search
subgroup- subgroup containing signatures
type- type of signature ("sig" or "sigset")
file- name of signature file
Returns
int

Definition at line 193 of file imagery/find.c.

◆ I_find_subgroup()

int I_find_subgroup ( const char *  group,
const char *  subgroup 
)

Searches for a subgroup in the current mapset.

Parameters
group
subgroup
Returns
int 1 if subgroup was found, 0 otherwise

Definition at line 87 of file imagery/find.c.

References G_debug(), G_find_file2_misc(), G_mapset(), GNAME_MAX, HOST_DIRSEP, I_find_group(), and NULL.

◆ I_find_subgroup2()

int I_find_subgroup2 ( const char *  group,
const char *  subgroup,
const char *  mapset 
)

Searches for a subgroup in specified mapset or any mapset if mapset is not set.

Parameters
group
subgroup
mapset
Returns
int 1 if subrgoup was found, 0 otherwise

Definition at line 110 of file imagery/find.c.

References G_debug(), G_find_file2_misc(), GNAME_MAX, HOST_DIRSEP, I_find_group2(), and NULL.

◆ I_find_subgroup_file()

int I_find_subgroup_file ( const char *  group,
const char *  subgroup,
const char *  file 
)

Searches for a subgroup file in the current mapset.

Parameters
group
subgroup
file
Returns
int 1 if file was found, 0 otherwise

Definition at line 133 of file imagery/find.c.

References G_debug(), G_find_file2_misc(), G_mapset(), GNAME_MAX, HOST_DIRSEP, I_find_group(), and NULL.

◆ I_find_subgroup_file2()

int I_find_subgroup_file2 ( const char *  group,
const char *  subgroup,
const char *  mapset,
const char *  file 
)

Searches for a subgroup file in the specified mapset.

Parameters
group
subgroup
mapset
file
Returns
int 1 if file was found, 0 otherwise

Definition at line 160 of file imagery/find.c.

References G_debug(), G_find_file2_misc(), GNAME_MAX, HOST_DIRSEP, I_find_group2(), and NULL.

Referenced by fopen_subgroup_file_old().