GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
defs/imagery.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * I_malloc (size_t)
 
void * I_realloc (void *, size_t)
 
int I_free (void *)
 
double ** I_alloc_double2 (int, int)
 
int * I_alloc_int (int)
 
int ** I_alloc_int2 (int, int)
 
int I_free_int2 (int **)
 
int I_free_double2 (double **)
 
double *** I_alloc_double3 (int, int, int)
 
int I_free_double3 (double ***)
 
int I_get_to_eol (char *, int, FILE *)
 
int I_find_group (const char *)
 does group exist? More...
 
int I_find_group2 (const char *, const char *)
 Does the group exists? More...
 
int I_find_group_file (const char *, const char *)
 Searches for a group file in the current mapset. More...
 
int I_find_group_file2 (const char *, const char *, const char *)
 Searches for a group file in the specified mapset. More...
 
int I_find_subgroup (const char *, const char *)
 Searches for a subgroup in the current mapset. More...
 
int I_find_subgroup2 (const char *, const char *, const char *)
 Searches for a subgroup in specified mapset or any mapset if mapset is not set. More...
 
int I_find_subgroup_file (const char *, const char *, const char *)
 Searches for a subgroup file in the current mapset. More...
 
int I_find_subgroup_file2 (const char *, const char *, const char *, const char *)
 Searches for a subgroup file in the specified mapset. More...
 
int I_find_signature_file (const char *, const char *, const char *, const char *)
 does signature file exists? More...
 
FILE * I_fopen_group_file_new (const char *, const char *)
 
FILE * I_fopen_group_file_append (const char *, const char *)
 
FILE * I_fopen_group_file_old (const char *, const char *)
 Open group file for reading. More...
 
FILE * I_fopen_group_file_old2 (const char *, const char *, const char *)
 Open group file for reading. More...
 
FILE * I_fopen_subgroup_file_new (const char *, const char *, const char *)
 
FILE * I_fopen_subgroup_file_append (const char *, const char *, const char *)
 
FILE * I_fopen_subgroup_file_old (const char *, const char *, const char *)
 
FILE * I_fopen_subgroup_file_old2 (const char *, const char *, const char *, const char *)
 
int I_compute_georef_equations (struct Control_Points *, double *, double *, double *, double *, int)
 
int I_georef (double, double, double *, double *, double *, double *, int)
 
int I_compute_georef_equations_tps (struct Control_Points *, double **, double **, double **, double **)
 
int I_georef_tps (double, double, double *, double *, double *, double *, struct Control_Points *, int)
 
int I_get_group (char *)
 
int I_put_group (const char *)
 
int I_get_subgroup (const char *, char *)
 
int I_put_subgroup (const char *, const char *)
 
int I_get_group_ref (const char *, struct Ref *)
 read group REF file More...
 
int I_get_group_ref2 (const char *, const char *, struct Ref *)
 read group REF file More...
 
int I_get_subgroup_ref (const char *, const char *, struct Ref *)
 read subgroup REF file More...
 
int I_get_subgroup_ref2 (const char *, const char *, const char *, struct Ref *)
 read subgroup REF file More...
 
int I_init_ref_color_nums (struct Ref *)
 
int I_put_group_ref (const char *, const struct Ref *)
 write group REF file More...
 
int I_put_subgroup_ref (const char *, const char *, const struct Ref *)
 write subgroup REF file More...
 
int I_add_file_to_group_ref (const char *, const char *, struct Ref *)
 add file name to Ref structure More...
 
int I_transfer_group_ref_file (const struct Ref *, int, struct Ref *)
 copy Ref lists More...
 
int I_init_group_ref (struct Ref *)
 initialize Ref structure More...
 
int I_free_group_ref (struct Ref *)
 free Ref structure More...
 
int I_iclass_analysis (IClass_statistics *, struct Ref *, struct Map_info *, const char *, const char *, const char *)
 Calculates statistical values for one class and multiple bands based on training areas. More...
 
int I_iclass_init_group (const char *, const char *, struct Ref *)
 Read files for the specified group subgroup into the Ref structure. More...
 
void I_iclass_create_raster (IClass_statistics *, struct Ref *, const char *)
 Create raster map based on statistics. More...
 
void I_iclass_statistics_get_nbands (IClass_statistics *, int *)
 Get number of bands. More...
 
void I_iclass_statistics_get_cat (IClass_statistics *, int *)
 Get category (class). More...
 
void I_iclass_statistics_get_name (IClass_statistics *, const char **)
 Get category (class) name. More...
 
void I_iclass_statistics_get_color (IClass_statistics *, const char **)
 Get category (class) color. More...
 
void I_iclass_statistics_get_ncells (IClass_statistics *, int *)
 Get number of cells in training areas. More...
 
int I_iclass_statistics_get_max (IClass_statistics *, int, int *)
 Get maximum value in band. More...
 
int I_iclass_statistics_get_range_max (IClass_statistics *, int, int *)
 Get maximum cell value based on mean and standard deviation for band. More...
 
int I_iclass_statistics_get_min (IClass_statistics *, int, int *)
 Get minimum value in band. More...
 
int I_iclass_statistics_get_range_min (IClass_statistics *, int, int *)
 Get minimum cell value based on mean and standard deviation for band. More...
 
int I_iclass_statistics_get_sum (IClass_statistics *, int, float *)
 Get sum of values in band. More...
 
int I_iclass_statistics_get_mean (IClass_statistics *, int, float *)
 Get mean of cell category values in band. More...
 
int I_iclass_statistics_get_stddev (IClass_statistics *, int, float *)
 Get standard deviation of cell category values in band. More...
 
void I_iclass_statistics_get_nstd (IClass_statistics *, float *)
 Get the multiplier of standard deviation. More...
 
void I_iclass_statistics_set_nstd (IClass_statistics *, float)
 Set the multiplier of standard deviation. More...
 
int I_iclass_statistics_get_histo (IClass_statistics *, int, int, int *)
 Get histogram value in band. More...
 
int I_iclass_statistics_get_product (IClass_statistics *, int, int, float *)
 Get product value. More...
 
void I_iclass_init_statistics (IClass_statistics *, int, const char *, const char *, float)
 Initialize statistics. More...
 
void I_iclass_free_statistics (IClass_statistics *)
 Free space allocated for statistics attributes. More...
 
int I_iclass_init_signatures (struct Signature *, struct Ref *)
 Initialize signatures. More...
 
void I_iclass_add_signature (struct Signature *, IClass_statistics *)
 Add one signature. More...
 
int I_iclass_write_signatures (struct Signature *, const char *, const char *, const char *)
 Write signtures to signature file. More...
 
int I_list_group (const char *, const struct Ref *, FILE *)
 Prints maps in a group (fancy version) More...
 
int I_list_group_simple (const struct Ref *, FILE *)
 Prints maps in a group (simple version) More...
 
char ** I_list_subgroups (const char *, int *)
 Get list of subgroups which a group contatins. More...
 
char ** I_list_subgroups2 (const char *, const char *, int *)
 Get list of subgroups which a group contatins. More...
 
int I_list_subgroup (const char *, const char *, const struct Ref *, FILE *)
 Prints maps in a subgroup (fancy version) More...
 
int I_list_subgroup_simple (const struct Ref *, FILE *)
 Prints maps in a subgroup (simple version) More...
 
char * I_location_info (const char *)
 
int I_new_control_point (struct Control_Points *, double, double, double, double, int)
 add new control point More...
 
int I_get_control_points (const char *, struct Control_Points *)
 read group control points More...
 
int I_put_control_points (const char *, const struct Control_Points *)
 write group control points More...
 
FILE * I_fopen_group_ref_new (const char *)
 
FILE * I_fopen_group_ref_old (const char *)
 
FILE * I_fopen_group_ref_old2 (const char *, const char *)
 
FILE * I_fopen_subgroup_ref_new (const char *, const char *)
 
FILE * I_fopen_subgroup_ref_old (const char *, const char *)
 
FILE * I_fopen_subgroup_ref_old2 (const char *, const char *, const char *)
 
void I_sc_init_cats (struct scCats *, int, int)
 Initialize structure for storing scatter plots data. More...
 
void I_sc_free_cats (struct scCats *)
 Free data of struct scCats, the structure itself remains allocated. More...
 
int I_sc_add_cat (struct scCats *)
 Add category. More...
 
int I_sc_insert_scatt_data (struct scCats *, struct scdScattData *, int, int)
 Insert scatter plot data . Inserted scatt_data struct must have same type as cats struct (SC_SCATT_DATA or SC_SCATT_CONDITIONS). More...
 
void I_scd_init_scatt_data (struct scdScattData *, int, int, void *)
 Insert scatter plot data. More...
 
int I_compute_scatts (struct Cell_head *, struct scCats *, const char **, const char **, int, struct scCats *, const char **)
 Compute scatter plots data. More...
 
int I_create_cat_rast (struct Cell_head *, const char *)
 Create category raster conditions file. The file is used for holding selected areas from mapwindow. The reason why the standard GRASS raster is not used is that for every modification (new area is selected) we would need to create whole new raster. Instead of this scatter plot only modifies affected region in the internal pgm file. More...
 
int I_insert_patch_to_cat_rast (const char *, struct Cell_head *, const char *)
 Insert raster map patch into pgm file. More...
 
int I_id_scatt_to_bands (const int, const int, int *, int *)
 Compute band ids from scatter plot id. More...
 
int I_bands_to_id_scatt (const int, const int, const int, int *)
 Compute scatter plot id from band ids. More...
 
int I_merge_arrays (unsigned char *, unsigned char *, unsigned, unsigned, double)
 Merge arrays according to opacity. Every pixel in array must be represented by 4 values (RGBA). More...
 
int I_apply_colormap (unsigned char *, unsigned char *, unsigned, unsigned char *, unsigned char *)
 Apply colromap to the raster. More...
 
int I_rasterize (double *, int, unsigned char, struct Cell_head *, unsigned char *)
 Wrapper for using of iclass perimeter rasterization by scatter plot. Warning: calls Rast_set_window. More...
 
int I_init_signatures (struct Signature *, int)
 
int I_new_signature (struct Signature *)
 
int I_free_signatures (struct Signature *)
 
int I_read_one_signature (FILE *, struct Signature *)
 
int I_read_signatures (FILE *, struct Signature *)
 
int I_write_signatures (FILE *, struct Signature *)
 
FILE * I_fopen_signature_file_new (const char *, const char *, const char *)
 Create signature file. More...
 
FILE * I_fopen_signature_file_old (const char *, const char *, const char *)
 Open existing signature file. More...
 
int I_SigSetNClasses (struct SigSet *)
 
struct ClassDataI_AllocClassData (struct SigSet *, struct ClassSig *, int)
 
int I_InitSigSet (struct SigSet *)
 
int I_SigSetNBands (struct SigSet *, int)
 
struct ClassSigI_NewClassSig (struct SigSet *)
 
struct SubSigI_NewSubSig (struct SigSet *, struct ClassSig *)
 
int I_ReadSigSet (FILE *, struct SigSet *) WARN_UNUSED_RESULT
 
int I_SetSigTitle (struct SigSet *, const char *)
 
const char * I_GetSigTitle (const struct SigSet *)
 
int I_SetClassTitle (struct ClassSig *, const char *)
 
const char * I_GetClassTitle (const struct ClassSig *)
 
int I_WriteSigSet (FILE *, const struct SigSet *)
 
FILE * I_fopen_sigset_file_new (const char *, const char *, const char *)
 Create new signiture file in given group/subgroup. More...
 
FILE * I_fopen_sigset_file_old (const char *, const char *, const char *)
 Open existing signiture file. More...
 
int I_get_target (const char *, char *, char *)
 read target information More...
 
int I_put_target (const char *, const char *, const char *)
 write target information More...
 
int I_get_group_title (const char *, char *, int)
 
int I_put_group_title (const char *, const char *)
 
double I_variance (double, double, int)
 
double I_stddev (double, double, int)
 

Function Documentation

◆ I_add_file_to_group_ref()

int I_add_file_to_group_ref ( const char *  name,
const char *  mapset,
struct Ref ref 
)

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.

Parameters
name
mapset
ref
Returns
int

Definition at line 396 of file group.c.

References Ref::file, G_malloc, G_realloc, Ref_Files::mapset, Ref_Files::name, and Ref::nfiles.

Referenced by I_transfer_group_ref_file().

◆ I_alloc_double2()

double** I_alloc_double2 ( int  ,
int   
)

Definition at line 33 of file imagery/alloc.c.

Referenced by I_cluster_exec_allocate().

◆ I_alloc_double3()

double*** I_alloc_double3 ( int  ,
int  ,
int   
)

Definition at line 114 of file imagery/alloc.c.

◆ I_alloc_int()

int* I_alloc_int ( int  )

Definition at line 54 of file imagery/alloc.c.

Referenced by I_cluster_exec_allocate().

◆ I_alloc_int2()

int** I_alloc_int2 ( int  ,
int   
)

Definition at line 67 of file imagery/alloc.c.

◆ I_AllocClassData()

struct ClassData* I_AllocClassData ( struct SigSet ,
struct ClassSig ,
int   
)

Definition at line 43 of file sigset.c.

◆ I_apply_colormap()

int I_apply_colormap ( unsigned char *  vals,
unsigned char *  vals_mask,
unsigned  nvals,
unsigned char *  colmap,
unsigned char *  col_vals 
)

Apply colromap to the raster.

Implementd for speeding up of scatter plots rendering.

Parameters
valsarray of values for applying the colormap
vals_maskmaks of vals array
nvalsnumber of items of vals_mask and vals array
colmapcolour map to be applied
[out]col_valsoutput raster with applied color map (length is 4 * nvals (RGBA))
Returns
0

Definition at line 905 of file iscatt_core.c.

◆ I_bands_to_id_scatt()

int I_bands_to_id_scatt ( const int  b_1_id,
const int  b_2_id,
const int  n_bands,
int *  scatt_id 
)

Compute scatter plot id from band ids.

See also I_id_scatt_to_bands

Parameters
b_1_idid of band1
b_1_idid of band2
n_bandsnumber of bands
[out]scatt_idscatter plot id
Returns
0

Definition at line 69 of file iscatt_structs.c.

◆ I_compute_georef_equations()

int I_compute_georef_equations ( struct Control_Points ,
double *  ,
double *  ,
double *  ,
double *  ,
int   
)

◆ I_compute_georef_equations_tps()

int I_compute_georef_equations_tps ( struct Control_Points ,
double **  ,
double **  ,
double **  ,
double **   
)

◆ I_compute_scatts()

int I_compute_scatts ( struct Cell_head region,
struct scCats scatt_conds,
const char **  cats_rasts_conds,
const char **  bands,
int  n_bands,
struct scCats scatts,
const char **  cats_rasts 
)

Compute scatter plots data.

If category has not defined category raster condition file and no scatter plot exists with condition, default/full scatter plot is computed. Warning: calls Rast_set_window

Parameters
regionanalysis region, beaware that all input data must be prepared for this region (bands (their ranges), cats_rasts_conds rasters...)
regionfunction calls Rast_set_window for this region
scatt_condspointer to scScatts struct of type SC_SCATT_CONDITIONS, where are stored selected areas (conditions) in scatter plots
cats_rasts_condspaths to category raster conditions files representing selected areas from mapwindow (conditions) in rasters for every category
cats_rasts_condsindex in array represents corresponding category id
cats_rasts_condsfor manipulation with category raster conditions file see also I_id_scatt_to_bands and I_insert_patch_to_cat_rast
bandsnames of analyzed bands, order of bands is defined by their id
n_bandsnumber of bands
[out]scattspointer to scScatts struct of type SC_SCATT_DATA, where are computed scatter plots stored
[out]cats_rastsarray of raster maps names for every category where will be stored all selected pixels
Returns
0 on success
-1 on failure

Definition at line 695 of file iscatt_core.c.

◆ I_create_cat_rast()

int I_create_cat_rast ( struct Cell_head cat_rast_region,
const char *  cat_rast 
)

Create category raster conditions file. The file is used for holding selected areas from mapwindow. The reason why the standard GRASS raster is not used is that for every modification (new area is selected) we would need to create whole new raster. Instead of this scatter plot only modifies affected region in the internal pgm file.

Parameters
cat_rast_regionregion to be file generated for
[out]cat_rastpath where the pgm raster file will be generated

Definition at line 58 of file iscatt_core.c.

References G_warning().

◆ 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().

◆ I_fopen_group_file_append()

FILE* I_fopen_group_file_append ( const char *  ,
const char *   
)

Definition at line 83 of file fopen.c.

References _, G_fopen_append_misc(), G_mapset(), and G_warning().

◆ I_fopen_group_file_new()

FILE* I_fopen_group_file_new ( const char *  ,
const char *   
)

◆ I_fopen_group_file_old()

FILE* I_fopen_group_file_old ( const char *  group,
const char *  file 
)

Open group file for reading.

Internally uses G_fopen_old_misc

Parameters
group
file
Returns
FILE *

Definition at line 105 of file fopen.c.

References fopen_group_file_old(), and NULL.

Referenced by I_fopen_group_ref_old(), I_get_control_points(), I_get_group_title(), I_get_subgroup(), and I_get_target().

◆ I_fopen_group_file_old2()

FILE* I_fopen_group_file_old2 ( const char *  group,
const char *  mapset,
const char *  file 
)

Open group file for reading.

Internally uses G_fopen_old_misc

Parameters
group
mapset
file
Returns
FILE *

Definition at line 121 of file fopen.c.

References fopen_group_file_old().

Referenced by I_fopen_group_ref_old2().

◆ I_fopen_group_ref_new()

FILE* I_fopen_group_ref_new ( const char *  )

Definition at line 25 of file ref.c.

References I_fopen_group_file_new().

◆ I_fopen_group_ref_old()

FILE* I_fopen_group_ref_old ( const char *  )

Definition at line 30 of file ref.c.

References I_fopen_group_file_old().

◆ I_fopen_group_ref_old2()

FILE* I_fopen_group_ref_old2 ( const char *  ,
const char *   
)

Definition at line 35 of file ref.c.

References I_fopen_group_file_old2().

◆ I_fopen_signature_file_new()

FILE* I_fopen_signature_file_new ( const char *  group,
const char *  subgroup,
const char *  name 
)

Create signature file.

Parameters
groupgroup name
subgroupsubgroup name in given group
namesignature filename
Returns
pointer to FILE*
NULL on error

Definition at line 27 of file sigfile.c.

References G__make_mapset_element_misc(), G_fopen_new_misc(), G_name_is_fully_qualified(), GMAPSET_MAX, GNAME_MAX, and GPATH_MAX.

◆ I_fopen_signature_file_old()

FILE* I_fopen_signature_file_old ( const char *  group,
const char *  subgroup,
const char *  name 
)

Open existing signature file.

Parameters
groupgroup name (may be fully qualified)
subgroupsubgroup name in given group
namesignature filename
Returns
pointer to FILE*
NULL on error

Definition at line 59 of file sigfile.c.

References G_fopen_old_misc(), G_unqualified_name(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, and NULL.

◆ I_fopen_sigset_file_new()

FILE* I_fopen_sigset_file_new ( const char *  group,
const char *  subgroup,
const char *  name 
)

Create new signiture file in given group/subgroup.

Note: Prints warning on error and returns NULL.

Parameters
groupname of group
subgroupname of subgroup
namename of signiture file
Returns
pointer to FILE
NULL on error

Definition at line 32 of file sigsetfile.c.

References _, G__make_mapset_element_misc(), G_fopen_new_misc(), G_mapset(), G_name_is_fully_qualified(), G_warning(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, and NULL.

◆ I_fopen_sigset_file_old()

FILE* I_fopen_sigset_file_old ( const char *  group,
const char *  subgroup,
const char *  name 
)

Open existing signiture file.

Parameters
groupname of group (may be fully qualified)
subgroupname of subgroup
namename of signiture file
Returns
pointer to FILE*
NULL on error

Definition at line 74 of file sigsetfile.c.

References G_fopen_old_misc(), G_unqualified_name(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, and NULL.

◆ I_fopen_subgroup_file_append()

FILE* I_fopen_subgroup_file_append ( const char *  ,
const char *  ,
const char *   
)

◆ I_fopen_subgroup_file_new()

FILE* I_fopen_subgroup_file_new ( const char *  ,
const char *  ,
const char *   
)

◆ I_fopen_subgroup_file_old()

FILE* I_fopen_subgroup_file_old ( const char *  ,
const char *  ,
const char *   
)

Definition at line 171 of file fopen.c.

References fopen_subgroup_file_old(), and NULL.

Referenced by I_fopen_subgroup_ref_old().

◆ I_fopen_subgroup_file_old2()

FILE* I_fopen_subgroup_file_old2 ( const char *  ,
const char *  ,
const char *  ,
const char *   
)

Definition at line 177 of file fopen.c.

References fopen_subgroup_file_old().

Referenced by I_fopen_subgroup_ref_old2().

◆ I_fopen_subgroup_ref_new()

FILE* I_fopen_subgroup_ref_new ( const char *  ,
const char *   
)

Definition at line 49 of file ref.c.

References I_fopen_subgroup_file_new().

◆ I_fopen_subgroup_ref_old()

FILE* I_fopen_subgroup_ref_old ( const char *  ,
const char *   
)

Definition at line 54 of file ref.c.

References I_fopen_subgroup_file_old().

◆ I_fopen_subgroup_ref_old2()

FILE* I_fopen_subgroup_ref_old2 ( const char *  ,
const char *  ,
const char *   
)

Definition at line 62 of file ref.c.

References I_fopen_subgroup_file_old2().

◆ I_free()

int I_free ( void *  )

Definition at line 24 of file imagery/alloc.c.

References G_free(), and NULL.

Referenced by I_cluster_exec_free().

◆ I_free_double2()

int I_free_double2 ( double **  )

Definition at line 100 of file imagery/alloc.c.

References G_free(), and NULL.

Referenced by I_cluster_exec_free(), and I_free_double3().

◆ I_free_double3()

int I_free_double3 ( double ***  )

Definition at line 137 of file imagery/alloc.c.

References G_free(), I_free_double2(), and NULL.

◆ I_free_group_ref()

int I_free_group_ref ( struct Ref ref)

free Ref structure

This routine frees memory allocated to the ref structure.

Parameters
ref
Returns
int

Definition at line 502 of file group.c.

References Ref::file, free(), and Ref::nfiles.

Referenced by I_iclass_init_group().

◆ I_free_int2()

int I_free_int2 ( int **  )

Definition at line 86 of file imagery/alloc.c.

References G_free(), and NULL.

◆ I_free_signatures()

int I_free_signatures ( struct Signature )

◆ I_georef()

int I_georef ( double  ,
double  ,
double *  ,
double *  ,
double *  ,
double *  ,
int   
)

◆ I_georef_tps()

int I_georef_tps ( double  ,
double  ,
double *  ,
double *  ,
double *  ,
double *  ,
struct Control_Points ,
int   
)

◆ I_get_control_points()

int I_get_control_points ( const char *  group,
struct Control_Points cp 
)

read group control points

Reads the control points from the POINTS file for the group into the cp structure. Returns 1 if successful; 0 otherwise (and prints a diagnostic error). Note. An error message is printed if the POINTS file is invalid, or does not exist.

Parameters
group
cp
Returns
int

Definition at line 117 of file points.c.

References _, G_mapset(), G_warning(), I_fopen_group_file_old(), NULL, and POINT_FILE.

◆ I_get_group()

int I_get_group ( char *  )

Definition at line 38 of file group.c.

References G_fopen_old(), G_mapset(), G_suppress_warnings(), GROUPFILE, and NULL.

◆ I_get_group_ref()

int I_get_group_ref ( const char *  group,
struct Ref ref 
)

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).

Parameters
group
ref
Returns
int

Definition at line 114 of file group.c.

Referenced by I_iclass_init_group().

◆ I_get_group_ref2()

int I_get_group_ref2 ( const char *  group,
const char *  mapset,
struct Ref ref 
)

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).

Parameters
group
mapset
ref
Returns
int

Definition at line 133 of file group.c.

◆ I_get_group_title()

int I_get_group_title ( const char *  ,
char *  ,
int   
)

Definition at line 5 of file title.c.

References G_getl2(), G_suppress_warnings(), I_fopen_group_file_old(), and NULL.

◆ I_get_subgroup()

int I_get_subgroup ( const char *  ,
char *   
)

Definition at line 68 of file group.c.

References G_suppress_warnings(), I_find_group(), I_fopen_group_file_old(), NULL, and SUBGROUPFILE.

◆ I_get_subgroup_ref()

int I_get_subgroup_ref ( const char *  group,
const char *  subgroup,
struct Ref ref 
)

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).

Parameters
group
subgroup
ref
Returns
int

Definition at line 153 of file group.c.

Referenced by I_iclass_init_group().

◆ I_get_subgroup_ref2()

int I_get_subgroup_ref2 ( const char *  group,
const char *  subgroup,
const char *  mapset,
struct Ref ref 
)

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).

Parameters
group
subgroup
mapset
ref
Returns
int

Definition at line 174 of file group.c.

◆ I_get_target()

int I_get_target ( const char *  group,
char *  location,
char *  mapset 
)

read target information

Reads the target location and mapset from the TARGET file for the specified group. Returns 1 if successful; 0 otherwise (and prints a diagnostic error). This routine is used by g.gui.gcp and i.rectify and probably should not be used by other programs. Note. This routine does not validate the target information.

Parameters
group
location
mapset
Returns
int

Definition at line 22 of file target.c.

References _, G_suppress_warnings(), G_warning(), I_fopen_group_file_old(), and NULL.

◆ I_get_to_eol()

int I_get_to_eol ( char *  ,
int  ,
FILE *   
)

Definition at line 12 of file eol.c.

Referenced by I_read_signatures().

◆ I_GetClassTitle()

const char* I_GetClassTitle ( const struct ClassSig )

Definition at line 311 of file sigset.c.

References ClassSig::title.

Referenced by I_WriteSigSet().

◆ I_GetSigTitle()

const char* I_GetSigTitle ( const struct SigSet )

Definition at line 292 of file sigset.c.

References SigSet::title.

Referenced by I_WriteSigSet().

◆ I_iclass_add_signature()

void I_iclass_add_signature ( struct Signature sigs,
IClass_statistics statistics 
)

◆ I_iclass_analysis()

int I_iclass_analysis ( IClass_statistics statistics,
struct Ref refer,
struct Map_info map_info,
const char *  layer_name,
const char *  group,
const char *  raster_name 
)

Calculates statistical values for one class and multiple bands based on training areas.

Calculates values statistical based on the cells that are within training areas. Creates raster map to display the cells of the image bands which fall within standard deviations from the means.

Parameters
statisticspointer to bands statistics
referpointer to band files structure
map_infovector map with training areas
layer_namevector layer
groupname of imagery group
raster_namename of temporary raster map (to be created)
Returns
number of processed training areas
-1 on failure

Definition at line 50 of file iclass.c.

References _, alloc_statistics(), IClass_statistics::cat, close_band_files(), create_raster(), free_perimeters(), G_debug(), G_get_set_window(), G_warning(), make_all_statistics(), Ref::nfiles, open_band_files(), and vector2perimeters().

◆ I_iclass_create_raster()

void I_iclass_create_raster ( IClass_statistics statistics,
struct Ref refer,
const char *  raster_name 
)

Create raster map based on statistics.

Parameters
statisticspointer to bands statistics
referpointer to band files structure
raster_namename of temporary raster map (to be created)

Definition at line 163 of file iclass.c.

References b, band_range(), close_band_files(), create_raster(), IClass_statistics::nbands, and open_band_files().

◆ I_iclass_free_statistics()

void I_iclass_free_statistics ( IClass_statistics statistics)

◆ I_iclass_init_group()

int I_iclass_init_group ( const char *  group_name,
const char *  subgroup_name,
struct Ref refer 
)

Read files for the specified group subgroup into the Ref structure.

Parameters
group_namename of imagery group
subgroup_namename of imagery subgroup
subgroup_nameif it is NULL, bands from group will be used
[out]referpointer to band files structure
Returns
1 on success
0 on failure

Definition at line 110 of file iclass.c.

References _, Ref::file, G_debug(), G_find_raster(), G_warning(), I_free_group_ref(), I_get_group_ref(), I_get_subgroup_ref(), I_init_group_ref(), Ref_Files::mapset, Ref_Files::name, Ref::nfiles, and NULL.

◆ I_iclass_init_signatures()

int I_iclass_init_signatures ( struct Signature sigs,
struct Ref refer 
)

Initialize signatures.

Parameters
[out]sigspointer to signatures
referpointer to band files structure
Returns
1 on success
0 on failure

Definition at line 47 of file iclass_signatures.c.

References G_debug(), I_init_signatures(), and Ref::nfiles.

◆ I_iclass_init_statistics()

void I_iclass_init_statistics ( IClass_statistics statistics,
int  category,
const char *  name,
const char *  color,
float  nstd 
)

◆ I_iclass_statistics_get_cat()

void I_iclass_statistics_get_cat ( IClass_statistics statistics,
int *  cat 
)

Get category (class).

Parameters
statisticspointer to statistics structure
[out]catcategory

Definition at line 475 of file iclass_statistics.c.

References IClass_statistics::cat.

◆ I_iclass_statistics_get_color()

void I_iclass_statistics_get_color ( IClass_statistics statistics,
const char **  color 
)

Get category (class) color.

Note
color is pointer to already allocated const char * in statistics. You should not free it.
Parameters
statisticspointer to statistics structure
[out]colorcategory color

Definition at line 506 of file iclass_statistics.c.

References IClass_statistics::color.

◆ I_iclass_statistics_get_histo()

int I_iclass_statistics_get_histo ( IClass_statistics statistics,
int  band,
int  cat,
int *  value 
)

Get histogram value in band.

Each band has one value for each raster cell category. Value is number of cells in category.

Parameters
statisticspointer to statistics structure
bandband index
catraster cell category
[out]valuenumber of cells in category
Returns
1 on success
0 band index or cell category value out of range

Definition at line 676 of file iclass_statistics.c.

References _, IClass_statistics::band_histo, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_max()

int I_iclass_statistics_get_max ( IClass_statistics statistics,
int  band,
int *  max 
)

Get maximum value in band.

Parameters
statisticspointer to statistics structure
bandband index
[out]maxmaximum value
Returns
1 on success
0 band index out of range

Definition at line 580 of file iclass_statistics.c.

References _, IClass_statistics::band_max, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_mean()

int I_iclass_statistics_get_mean ( IClass_statistics statistics,
int  band,
float *  mean 
)

Get mean of cell category values in band.

Parameters
statisticspointer to statistics structure
bandband index
[out]meanmean
Returns
1 on success
0 band index out of range

Definition at line 626 of file iclass_statistics.c.

References _, IClass_statistics::band_mean, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_min()

int I_iclass_statistics_get_min ( IClass_statistics statistics,
int  band,
int *  min 
)

Get minimum value in band.

Parameters
statisticspointer to statistics structure
bandband index
[out]minminimum value
Returns
1 on success
0 band index out of range

Definition at line 557 of file iclass_statistics.c.

References _, IClass_statistics::band_min, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_name()

void I_iclass_statistics_get_name ( IClass_statistics statistics,
const char **  name 
)

Get category (class) name.

Note
name is pointer to already allocated const char * in statistics. You should not free it.
Parameters
statisticspointer to statistics structure
[out]namecategory name

Definition at line 490 of file iclass_statistics.c.

References IClass_statistics::name.

◆ I_iclass_statistics_get_nbands()

void I_iclass_statistics_get_nbands ( IClass_statistics statistics,
int *  nbands 
)

Get number of bands.

Parameters
statisticspointer to statistics structure
[out]nbandsnumber of bands

Definition at line 463 of file iclass_statistics.c.

References IClass_statistics::nbands.

◆ I_iclass_statistics_get_ncells()

void I_iclass_statistics_get_ncells ( IClass_statistics statistics,
int *  ncells 
)

Get number of cells in training areas.

Parameters
statisticspointer to statistics structure
[out]ncellsnumber of cells

Definition at line 519 of file iclass_statistics.c.

References IClass_statistics::ncells.

◆ I_iclass_statistics_get_nstd()

void I_iclass_statistics_get_nstd ( IClass_statistics statistics,
float *  nstd 
)

Get the multiplier of standard deviation.

Parameters
statisticspointer to statistics structure
[out]nstdmultiplier of standard deviation

Definition at line 531 of file iclass_statistics.c.

References IClass_statistics::nstd.

◆ I_iclass_statistics_get_product()

int I_iclass_statistics_get_product ( IClass_statistics statistics,
int  band1,
int  band2,
float *  value 
)

Get product value.

Product value of two bands is sum of products of cell category values of two bands. Only cells from training areas are taken into account.

Parameters
statisticsstatistics object
band1index of first band
band2index of second band
[out]valueproduct value
Returns
1 on success
0 band index out of range

Definition at line 708 of file iclass_statistics.c.

References _, IClass_statistics::band_product, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_range_max()

int I_iclass_statistics_get_range_max ( IClass_statistics statistics,
int  band,
int *  max 
)

Get maximum cell value based on mean and standard deviation for band.

Parameters
statisticspointer to statistics structure
bandband index
[out]maxmaximum value
Returns
1 on success
0 band index out of range

Definition at line 754 of file iclass_statistics.c.

References _, IClass_statistics::band_range_max, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_range_min()

int I_iclass_statistics_get_range_min ( IClass_statistics statistics,
int  band,
int *  min 
)

Get minimum cell value based on mean and standard deviation for band.

Parameters
statisticspointer to statistics structure
bandband index
[out]minminimum value
Returns
1 on success
0 band index out of range

Definition at line 731 of file iclass_statistics.c.

References _, IClass_statistics::band_range_min, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_stddev()

int I_iclass_statistics_get_stddev ( IClass_statistics statistics,
int  band,
float *  stddev 
)

Get standard deviation of cell category values in band.

Parameters
statisticspointer to statistics structure
bandband index
[out]stddevstandard deviation
Returns
1 on success
0 band index out of range

Definition at line 649 of file iclass_statistics.c.

References _, IClass_statistics::band_stddev, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_get_sum()

int I_iclass_statistics_get_sum ( IClass_statistics statistics,
int  band,
float *  sum 
)

Get sum of values in band.

Parameters
statisticspointer to statistics structure
bandband index
[out]sumsum
Returns
1 on success
0 band index out of range

Definition at line 603 of file iclass_statistics.c.

References _, IClass_statistics::band_sum, G_warning(), and IClass_statistics::nbands.

◆ I_iclass_statistics_set_nstd()

void I_iclass_statistics_set_nstd ( IClass_statistics statistics,
float  nstd 
)

Set the multiplier of standard deviation.

Parameters
statisticspointer to statistics structure
nstdmultiplier of standard deviation

Definition at line 542 of file iclass_statistics.c.

References IClass_statistics::nstd.

◆ I_iclass_write_signatures()

int I_iclass_write_signatures ( struct Signature sigs,
const char *  group,
const char *  sub_group,
const char *  file_name 
)

Write signtures to signature file.

Parameters
sigspointer to signatures
groupimage group
sub_groupimage subgroup
file_namename of signature file
Returns
1 on success
0 on failure

Definition at line 109 of file iclass_signatures.c.

◆ I_id_scatt_to_bands()

int I_id_scatt_to_bands ( const int  scatt_id,
const int  n_bands,
int *  b_1_id,
int *  b_2_id 
)

Compute band ids from scatter plot id.

Scatter plot id describes which bands defines the scatter plot.

Let say we have 3 bands, their ids are 0, 1 and 2. Scatter plot with id 0 consists of band 1 (b_1_id) 0 and band 2 (b_2_id) 1. All scatter plots: scatt_id b_1_id b_2_id 0 0 1 1 0 2 2 1 2

Parameters
scatt_idscatter plot id
n_bandsnumber of bands
[out]b_1_idid of band1
[out]b_2_idid of band2
Returns
0

Definition at line 39 of file iscatt_structs.c.

Referenced by I_sc_insert_scatt_data().

◆ I_init_group_ref()

int I_init_group_ref ( struct Ref ref)

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.

Parameters
ref
Returns
int

Definition at line 483 of file group.c.

References Ref::blu, Ref_Color::n, Ref::nfiles, NULL, and Ref_Color::table.

Referenced by I_iclass_init_group().

◆ I_init_ref_color_nums()

int I_init_ref_color_nums ( struct Ref )

Definition at line 260 of file group.c.

References Ref::blu, Ref_Color::index, Ref_Color::n, Ref::nfiles, NULL, and Ref_Color::table.

◆ I_init_signatures()

int I_init_signatures ( struct Signature ,
int   
)

◆ I_InitSigSet()

int I_InitSigSet ( struct SigSet )

Definition at line 56 of file sigset.c.

References SigSet::ClassSig, SigSet::nbands, SigSet::nclasses, NULL, and SigSet::title.

Referenced by I_ReadSigSet().

◆ I_insert_patch_to_cat_rast()

int I_insert_patch_to_cat_rast ( const char *  patch_rast,
struct Cell_head cat_rast_region,
const char *  cat_rast 
)

Insert raster map patch into pgm file.

See also
I_create_cat_rast

Warning: calls Rast_set_window

Parameters
patch_rastname of raster map
cat_rast_regionregion of category raster file
cat_rastpath to category raster file
Returns
0 on success
-1 on failure

Definition at line 236 of file iscatt_core.c.

◆ I_list_group()

int I_list_group ( const char *  group,
const struct Ref ref,
FILE *  fd 
)

Prints maps in a group (fancy version)

Parameters
groupgroup name
refgroup reference (set with I_get_group_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 26 of file list_gp.c.

References _, Ref::file, Ref_Files::mapset, max, Ref_Files::name, and Ref::nfiles.

◆ I_list_group_simple()

int I_list_group_simple ( const struct Ref ref,
FILE *  fd 
)

Prints maps in a group (simple version)

Same as I_list_group(), but without all the fancy stuff. Prints one map per line in map form.

Parameters
refgroup reference (set with I_get_group_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 73 of file list_gp.c.

References Ref::file, Ref_Files::mapset, Ref_Files::name, and Ref::nfiles.

Referenced by I_list_subgroup_simple().

◆ I_list_subgroup()

int I_list_subgroup ( const char *  group,
const char *  subgroup,
const struct Ref ref,
FILE *  fd 
)

Prints maps in a subgroup (fancy version)

Parameters
groupgroup name
subgroupsubgroup name
refgroup reference (set with I_get_subgroup_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 81 of file list_subgp.c.

References _, Ref::file, Ref_Files::mapset, max, Ref_Files::name, and Ref::nfiles.

◆ I_list_subgroup_simple()

int I_list_subgroup_simple ( const struct Ref ref,
FILE *  fd 
)

Prints maps in a subgroup (simple version)

Same as I_list_subgroup(), but without all the fancy stuff. Prints one map per line in map form.

Parameters
refgroup reference (set with I_get_subgroup_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 134 of file list_subgp.c.

References I_list_group_simple().

◆ I_list_subgroups()

char** I_list_subgroups ( const char *  group,
int *  subgs_num 
)

Get list of subgroups which a group contatins.

Parameters
groupgroup name
[out]subgs_numnumber of subgroups which the group contains
Returns
array of subgroup names

Definition at line 52 of file list_subgp.c.

References G_mapset(), and list_subgroups().

◆ I_list_subgroups2()

char** I_list_subgroups2 ( const char *  group,
const char *  mapset,
int *  subgs_num 
)

Get list of subgroups which a group contatins.

Parameters
groupgroup name
mapsetmapset name
[out]subgs_numnumber of subgroups which the group contains
Returns
array of subgroup names

Definition at line 67 of file list_subgp.c.

References list_subgroups().

◆ I_location_info()

char* I_location_info ( const char *  )

Definition at line 6 of file loc_info.c.

References G_calloc, G_location(), G_mapset(), and G_snprintf().

◆ I_malloc()

void* I_malloc ( size_t  )

Definition at line 6 of file imagery/alloc.c.

References b, and G_malloc.

◆ I_merge_arrays()

int I_merge_arrays ( unsigned char *  merged_arr,
unsigned char *  overlay_arr,
unsigned  rows,
unsigned  cols,
double  alpha 
)

Merge arrays according to opacity. Every pixel in array must be represented by 4 values (RGBA).

Implementd for speeding up of scatter plots rendering.

Parameters
merged_arrarray which will be overlayd with overlay_arr
overlay_arrarray to be merged_arr overlaid with
rowsnumber of rows for the both arrays
colsnumber of columns for the both arrays
alphatransparency (0-1) of the overlay array for merging
Returns
0

Definition at line 862 of file iscatt_core.c.

◆ I_new_control_point()

int I_new_control_point ( struct Control_Points cp,
double  e1,
double  n1,
double  e2,
double  n2,
int  status 
)

add new control point

Once the control points have been read into the cp structure, this routine adds new points to it. The new control point is given by e1 (column) and n1 (row) on the image, and the e2 (east) and n2 (north) for the target database. The value of status should be 1 if the point is a valid point; 0 otherwise.

Remarks
{Use of this routine implies that the point is probably good, so status should be set to 1.}
Parameters
cp
e1
n1
e2
n2
status
Returns
int

Definition at line 57 of file points.c.

References Control_Points::count, Control_Points::e1, Control_Points::e2, G_realloc, Control_Points::n1, Control_Points::n2, and Control_Points::status.

◆ I_new_signature()

int I_new_signature ( struct Signature )

◆ I_NewClassSig()

◆ I_NewSubSig()

struct SubSig* I_NewSubSig ( struct SigSet ,
struct ClassSig  
)

◆ I_put_control_points()

int I_put_control_points ( const char *  group,
const struct Control_Points cp 
)

write group control points

Writes the control points from the cp structure to the POINTS file for the specified group. Note. Points in cp with a negative status are not written to the POINTS file.

Parameters
group
cp
Returns
int

Definition at line 153 of file points.c.

References _, G_mapset(), G_warning(), I_fopen_group_file_new(), NULL, and POINT_FILE.

◆ I_put_group()

int I_put_group ( const char *  )

Definition at line 55 of file group.c.

References G_fopen_new(), GROUPFILE, and NULL.

◆ I_put_group_ref()

int I_put_group_ref ( const char *  group,
const struct Ref ref 
)

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.

Parameters
group
ref
Returns
int

Definition at line 318 of file group.c.

◆ I_put_group_title()

int I_put_group_title ( const char *  ,
const char *   
)

Definition at line 22 of file title.c.

References I_fopen_group_file_new(), and NULL.

◆ I_put_subgroup()

int I_put_subgroup ( const char *  ,
const char *   
)

Definition at line 87 of file group.c.

References I_find_group(), I_fopen_group_file_new(), NULL, and SUBGROUPFILE.

◆ I_put_subgroup_ref()

int I_put_subgroup_ref ( const char *  group,
const char *  subgroup,
const struct Ref ref 
)

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.

Parameters
group
subgroup
ref
Returns
int

Definition at line 340 of file group.c.

◆ I_put_target()

int I_put_target ( const char *  group,
const char *  location,
const char *  mapset 
)

write target information

Writes the target location and mapset to the TARGET file for the specified group. Returns 1 if successful; 0 otherwise (but no error messages are printed). This routine is used by i.target and probably should not be used by other programs. Note. This routine does not validate the target information.

Parameters
group
location
mapset
Returns
int

Definition at line 62 of file target.c.

References I_fopen_group_file_new(), and NULL.

◆ I_rasterize()

int I_rasterize ( double *  polygon,
int  pol_n_pts,
unsigned char  val,
struct Cell_head rast_region,
unsigned char *  rast 
)

Wrapper for using of iclass perimeter rasterization by scatter plot. Warning: calls Rast_set_window.

Parameters
polygonarray of polygon coordinates [x, y, x, y...]
pol_n_ptsnumber of points in the polygon array
valvalue to be assigned to cells, which belong to plygon
rast_regionregion of raster
[out]rastraster to be pologyn rasterized in
Returns
0 on success
1 on failure

Definition at line 948 of file iscatt_core.c.

◆ I_read_one_signature()

int I_read_one_signature ( FILE *  ,
struct Signature  
)

Definition at line 52 of file sig.c.

Referenced by I_read_signatures().

◆ I_read_signatures()

int I_read_signatures ( FILE *  ,
struct Signature  
)

Definition at line 94 of file sig.c.

References G_strip(), I_get_to_eol(), I_read_one_signature(), Signature::nsigs, and Signature::title.

◆ I_ReadSigSet()

int I_ReadSigSet ( FILE *  ,
struct SigSet  
)

Definition at line 124 of file sigset.c.

References I_InitSigSet().

◆ I_realloc()

void* I_realloc ( void *  ,
size_t   
)

Definition at line 16 of file imagery/alloc.c.

References b, and G_realloc.

◆ I_sc_add_cat()

int I_sc_add_cat ( struct scCats cats)

Add category.

Category represents group of scatter plots.

Parameters
catspointer to scCats struct
Returns
assigned category id (starts with 0)
-1 if maximum nuber of categories was reached

Definition at line 155 of file iscatt_structs.c.

References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_malloc, G_zero(), scCats::n_a_cats, scScatts::n_a_scatts, scCats::n_cats, scCats::n_scatts, scScatts::scatt_idxs, scScatts::scatts_arr, and scScatts::scatts_bands.

◆ I_sc_free_cats()

void I_sc_free_cats ( struct scCats cats)

Free data of struct scCats, the structure itself remains allocated.

Parameters
catspointer to existing scCats struct

Definition at line 119 of file iscatt_structs.c.

References scCats::cats_arr, scCats::cats_ids, scCats::cats_idxs, G_free(), scCats::n_a_cats, scCats::n_bands, scCats::n_cats, scCats::n_scatts, scScatts::scatt_idxs, scScatts::scatts_arr, scScatts::scatts_bands, and scCats::type.

◆ I_sc_init_cats()

void I_sc_init_cats ( struct scCats cats,
int  n_bands,
int  type 
)

Initialize structure for storing scatter plots data.

Parameters
catspointer to scCats struct
n_bandsnumber of bands
typeSC_SCATT_DATA - stores scatter plots
typeSC_SCATT_CONDITIONS - stores selected areas in scatter plots

Definition at line 88 of file iscatt_structs.c.

◆ I_sc_insert_scatt_data()

int I_sc_insert_scatt_data ( struct scCats cats,
struct scdScattData scatt_data,
int  cat_id,
int  scatt_id 
)

Insert scatter plot data . Inserted scatt_data struct must have same type as cats struct (SC_SCATT_DATA or SC_SCATT_CONDITIONS).

Parameters
catspointer to scCats struct
scarr_datapointer to scdScattData struct
cat_idid number of category
scatt_idid number of scatter plot
Returns
0 on success
-1 on failure

Definition at line 209 of file iscatt_structs.c.

References scdScattData::b_conds_arr, scCats::cats_arr, scCats::cats_idxs, I_id_scatt_to_bands(), scScatts::n_a_scatts, scCats::n_bands, scCats::n_cats, scCats::n_scatts, SC_SCATT_CONDITIONS, SC_SCATT_DATA, scScatts::scatt_idxs, scdScattData::scatt_vals_arr, scScatts::scatts_arr, scScatts::scatts_bands, and scCats::type.

◆ I_scd_init_scatt_data()

void I_scd_init_scatt_data ( struct scdScattData scatt_data,
int  type,
int  n_vals,
void *  data 
)

Insert scatter plot data.

Parameters
scatt_datapointer to existing struct scdScattData
typeSC_SCATT_DATA for scatter plots or SC_SCATT_CONDITIONS for selected areas in scatter plot
n_valsnumber of data values
dataarray of values (unsigned char for SC_SCATT_CONDITIONS, unsigned int for SC_SCATT_DATA)

Definition at line 261 of file iscatt_structs.c.

◆ I_SetClassTitle()

int I_SetClassTitle ( struct ClassSig ,
const char *   
)

Definition at line 300 of file sigset.c.

References free(), G_store(), NULL, and ClassSig::title.

◆ I_SetSigTitle()

int I_SetSigTitle ( struct SigSet ,
const char *   
)

Definition at line 281 of file sigset.c.

References free(), G_store(), NULL, and SigSet::title.

◆ I_SigSetNBands()

int I_SigSetNBands ( struct SigSet ,
int   
)

Definition at line 66 of file sigset.c.

References SigSet::nbands.

◆ I_SigSetNClasses()

int I_SigSetNClasses ( struct SigSet )

Definition at line 31 of file sigset.c.

References SigSet::ClassSig, count, SigSet::nclasses, and ClassSig::used.

◆ I_stddev()

double I_stddev ( double  ,
double  ,
int   
)

Definition at line 16 of file var.c.

References I_variance().

◆ I_transfer_group_ref_file()

int I_transfer_group_ref_file ( const struct Ref ref2,
int  n,
struct Ref ref1 
)

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:

struct Ref src,dst;
int n;
// some code to get information into <b>src</b>
...
I_init_group_ref (&dst);
for (n = 0; n < src.nfiles; n++)

This routine is used by g.gui.gcp to create the REF file for a subgroup.

Parameters
src
n
dst
Returns
int

Definition at line 448 of file group.c.

References Ref::blu, Ref::file, I_add_file_to_group_ref(), Ref_Files::mapset, Ref_Color::n, and Ref_Files::name.

◆ I_variance()

double I_variance ( double  ,
double  ,
int   
)

Definition at line 8 of file var.c.

Referenced by I_stddev().

◆ I_write_signatures()

int I_write_signatures ( FILE *  ,
struct Signature  
)

Definition at line 116 of file sig.c.

◆ I_WriteSigSet()