GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
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 ClassData * | I_AllocClassData (struct SigSet *, struct ClassSig *, int) |
int | I_InitSigSet (struct SigSet *) |
int | I_SigSetNBands (struct SigSet *, int) |
struct ClassSig * | I_NewClassSig (struct SigSet *) |
struct SubSig * | I_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) |
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.
name | |
mapset | |
ref |
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().
double** I_alloc_double2 | ( | int | , |
int | |||
) |
Definition at line 33 of file imagery/alloc.c.
Referenced by I_cluster_exec_allocate().
double*** I_alloc_double3 | ( | int | , |
int | , | ||
int | |||
) |
Definition at line 114 of file imagery/alloc.c.
int* I_alloc_int | ( | int | ) |
Definition at line 54 of file imagery/alloc.c.
Referenced by I_cluster_exec_allocate().
int** I_alloc_int2 | ( | int | , |
int | |||
) |
Definition at line 67 of file imagery/alloc.c.
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.
vals | array of values for applying the colormap | |
vals_mask | maks of vals array | |
nvals | number of items of vals_mask and vals array | |
colmap | colour map to be applied | |
[out] | col_vals | output raster with applied color map (length is 4 * nvals (RGBA)) |
Definition at line 905 of file iscatt_core.c.
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
b_1_id | id of band1 | |
b_1_id | id of band2 | |
n_bands | number of bands | |
[out] | scatt_id | scatter plot id |
Definition at line 69 of file iscatt_structs.c.
int I_compute_georef_equations | ( | struct Control_Points * | , |
double * | , | ||
double * | , | ||
double * | , | ||
double * | , | ||
int | |||
) |
int I_compute_georef_equations_tps | ( | struct Control_Points * | , |
double ** | , | ||
double ** | , | ||
double ** | , | ||
double ** | |||
) |
Definition at line 120 of file georef_tps.c.
References _, Control_Points::count, Control_Points::e1, Control_Points::e2, G_message(), MAX, MIN, MNPTERR, MUNSOLVABLE, Control_Points::n1, Control_Points::n2, and Control_Points::status.
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
region | analysis region, beaware that all input data must be prepared for this region (bands (their ranges), cats_rasts_conds rasters...) | |
region | function calls Rast_set_window for this region | |
scatt_conds | pointer to scScatts struct of type SC_SCATT_CONDITIONS, where are stored selected areas (conditions) in scatter plots | |
cats_rasts_conds | paths to category raster conditions files representing selected areas from mapwindow (conditions) in rasters for every category | |
cats_rasts_conds | index in array represents corresponding category id | |
cats_rasts_conds | for manipulation with category raster conditions file see also I_id_scatt_to_bands and I_insert_patch_to_cat_rast | |
bands | names of analyzed bands, order of bands is defined by their id | |
n_bands | number of bands | |
[out] | scatts | pointer to scScatts struct of type SC_SCATT_DATA, where are computed scatter plots stored |
[out] | cats_rasts | array of raster maps names for every category where will be stored all selected pixels |
Definition at line 695 of file iscatt_core.c.
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.
cat_rast_region | region to be file generated for | |
[out] | cat_rast | path where the pgm raster file will be generated |
Definition at line 58 of file iscatt_core.c.
References G_warning().
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.
group |
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().
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().
group | |
mapset |
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().
int I_find_group_file | ( | const char * | group, |
const char * | file | ||
) |
Searches for a group file in the current mapset.
group | |
file |
Definition at line 53 of file imagery/find.c.
References G_find_file2_misc(), G_mapset(), I_find_group(), and NULL.
int I_find_group_file2 | ( | const char * | group, |
const char * | mapset, | ||
const char * | file | ||
) |
Searches for a group file in the specified mapset.
group | |
file |
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().
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.
group | - group where to search |
subgroup | - subgroup containing signatures |
type | - type of signature ("sig" or "sigset") |
file | - name of signature file |
Definition at line 193 of file imagery/find.c.
int I_find_subgroup | ( | const char * | group, |
const char * | subgroup | ||
) |
Searches for a subgroup in the current mapset.
group | |
subgroup |
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.
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.
group | |
subgroup | |
mapset |
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.
int I_find_subgroup_file | ( | const char * | group, |
const char * | subgroup, | ||
const char * | file | ||
) |
Searches for a subgroup file in the current mapset.
group | |
subgroup | |
file |
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.
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.
group | |
subgroup | |
mapset | |
file |
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().
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().
FILE* I_fopen_group_file_new | ( | const char * | , |
const char * | |||
) |
Definition at line 70 of file fopen.c.
References _, G_fopen_new_misc(), G_mapset(), and G_warning().
Referenced by I_fopen_group_ref_new(), I_put_control_points(), I_put_group_title(), I_put_subgroup(), and I_put_target().
FILE* I_fopen_group_file_old | ( | const char * | group, |
const char * | file | ||
) |
Open group file for reading.
Internally uses G_fopen_old_misc
group | |
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().
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
group | |
mapset | |
file |
Definition at line 121 of file fopen.c.
References fopen_group_file_old().
Referenced by I_fopen_group_ref_old2().
FILE* I_fopen_group_ref_new | ( | const char * | ) |
Definition at line 25 of file ref.c.
References I_fopen_group_file_new().
FILE* I_fopen_group_ref_old | ( | const char * | ) |
Definition at line 30 of file ref.c.
References I_fopen_group_file_old().
FILE* I_fopen_group_ref_old2 | ( | const char * | , |
const char * | |||
) |
Definition at line 35 of file ref.c.
References I_fopen_group_file_old2().
FILE* I_fopen_signature_file_new | ( | const char * | group, |
const char * | subgroup, | ||
const char * | name | ||
) |
Create signature file.
group | group name |
subgroup | subgroup name in given group |
name | signature filename |
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.
FILE* I_fopen_signature_file_old | ( | const char * | group, |
const char * | subgroup, | ||
const char * | name | ||
) |
Open existing signature file.
group | group name (may be fully qualified) |
subgroup | subgroup name in given group |
name | signature filename |
Definition at line 59 of file sigfile.c.
References G_fopen_old_misc(), G_unqualified_name(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, and NULL.
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.
group | name of group |
subgroup | name of subgroup |
name | name of signiture file |
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.
FILE* I_fopen_sigset_file_old | ( | const char * | group, |
const char * | subgroup, | ||
const char * | name | ||
) |
Open existing signiture file.
group | name of group (may be fully qualified) |
subgroup | name of subgroup |
name | name of signiture file |
Definition at line 74 of file sigsetfile.c.
References G_fopen_old_misc(), G_unqualified_name(), GMAPSET_MAX, GNAME_MAX, GPATH_MAX, and NULL.
FILE* I_fopen_subgroup_file_append | ( | const char * | , |
const char * | , | ||
const char * | |||
) |
Definition at line 149 of file fopen.c.
References _, G__make_mapset_element_misc(), G_fopen_append_misc(), G_mapset(), G_warning(), and GNAME_MAX.
FILE* I_fopen_subgroup_file_new | ( | const char * | , |
const char * | , | ||
const char * | |||
) |
Definition at line 127 of file fopen.c.
References _, G__make_mapset_element_misc(), G_fopen_new_misc(), G_mapset(), G_warning(), and GNAME_MAX.
Referenced by I_fopen_subgroup_ref_new().
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().
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().
FILE* I_fopen_subgroup_ref_new | ( | const char * | , |
const char * | |||
) |
Definition at line 49 of file ref.c.
References I_fopen_subgroup_file_new().
FILE* I_fopen_subgroup_ref_old | ( | const char * | , |
const char * | |||
) |
Definition at line 54 of file ref.c.
References I_fopen_subgroup_file_old().
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().
int I_free | ( | void * | ) |
Definition at line 24 of file imagery/alloc.c.
References G_free(), and NULL.
Referenced by I_cluster_exec_free().
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().
int I_free_double3 | ( | double *** | ) |
Definition at line 137 of file imagery/alloc.c.
References G_free(), I_free_double2(), and NULL.
int I_free_group_ref | ( | struct Ref * | ref | ) |
free Ref structure
This routine frees memory allocated to the ref structure.
ref |
Definition at line 502 of file group.c.
References Ref::file, free(), and Ref::nfiles.
Referenced by I_iclass_init_group().
int I_free_int2 | ( | int ** | ) |
Definition at line 86 of file imagery/alloc.c.
int I_free_signatures | ( | struct Signature * | ) |
Definition at line 36 of file sig.c.
References free(), I_init_signatures(), One_Sig::mean, Signature::nbands, Signature::nsigs, Signature::sig, and One_Sig::var.
Referenced by I_cluster_begin().
int I_georef | ( | double | , |
double | , | ||
double * | , | ||
double * | , | ||
double * | , | ||
double * | , | ||
int | |||
) |
int I_georef_tps | ( | double | , |
double | , | ||
double * | , | ||
double * | , | ||
double * | , | ||
double * | , | ||
struct Control_Points * | , | ||
int | |||
) |
Definition at line 72 of file georef_tps.c.
References Control_Points::count, Control_Points::e1, Control_Points::e2, Control_Points::n1, Control_Points::n2, and Control_Points::status.
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.
group | |
cp |
Definition at line 117 of file points.c.
References _, G_mapset(), G_warning(), I_fopen_group_file_old(), NULL, and POINT_FILE.
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.
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).
group | |
ref |
Definition at line 114 of file group.c.
Referenced by I_iclass_init_group().
int I_get_group_ref2 | ( | const char * | group, |
const char * | mapset, | ||
struct Ref * | ref | ||
) |
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.
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.
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).
group | |
subgroup | |
ref |
Definition at line 153 of file group.c.
Referenced by I_iclass_init_group().
int I_get_subgroup_ref2 | ( | const char * | group, |
const char * | subgroup, | ||
const char * | mapset, | ||
struct Ref * | ref | ||
) |
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.
group | |
location | |
mapset |
Definition at line 22 of file target.c.
References _, G_suppress_warnings(), G_warning(), I_fopen_group_file_old(), and NULL.
int I_get_to_eol | ( | char * | , |
int | , | ||
FILE * | |||
) |
Definition at line 12 of file eol.c.
Referenced by I_read_signatures().
const char* I_GetClassTitle | ( | const struct ClassSig * | ) |
const char* I_GetSigTitle | ( | const struct SigSet * | ) |
void I_iclass_add_signature | ( | struct Signature * | sigs, |
IClass_statistics * | statistics | ||
) |
Add one signature.
[out] | sigs | pointer to signatures |
statistics | pointer to statistics structure |
Definition at line 63 of file iclass_signatures.c.
References b, One_Sig::b, IClass_statistics::band_mean, IClass_statistics::color, One_Sig::desc, g, One_Sig::g, G_debug(), G_str_to_color(), One_Sig::have_color, I_new_signature(), One_Sig::mean, IClass_statistics::name, Signature::nbands, IClass_statistics::ncells, One_Sig::npoints, Signature::nsigs, r, One_Sig::r, Signature::sig, One_Sig::status, One_Sig::var, and var_signature().
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.
statistics | pointer to bands statistics |
refer | pointer to band files structure |
map_info | vector map with training areas |
layer_name | vector layer |
group | name of imagery group |
raster_name | name of temporary raster map (to be created) |
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().
void I_iclass_create_raster | ( | IClass_statistics * | statistics, |
struct Ref * | refer, | ||
const char * | raster_name | ||
) |
Create raster map based on statistics.
statistics | pointer to bands statistics |
refer | pointer to band files structure |
raster_name | name 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().
void I_iclass_free_statistics | ( | IClass_statistics * | statistics | ) |
Free space allocated for statistics attributes.
Frees all allocated arrays in statistics structure.
statistics | pointer to statistics structure |
Definition at line 108 of file iclass_statistics.c.
References IClass_statistics::band_histo, IClass_statistics::band_max, IClass_statistics::band_mean, IClass_statistics::band_min, IClass_statistics::band_product, IClass_statistics::band_range_max, IClass_statistics::band_range_min, IClass_statistics::band_stddev, IClass_statistics::band_sum, IClass_statistics::color, G_debug(), G_free(), IClass_statistics::name, and IClass_statistics::nbands.
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.
group_name | name of imagery group | |
subgroup_name | name of imagery subgroup | |
subgroup_name | if it is NULL, bands from group will be used | |
[out] | refer | pointer to band files structure |
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.
Initialize signatures.
[out] | sigs | pointer to signatures |
refer | pointer to band files structure |
Definition at line 47 of file iclass_signatures.c.
References G_debug(), I_init_signatures(), and Ref::nfiles.
void I_iclass_init_statistics | ( | IClass_statistics * | statistics, |
int | category, | ||
const char * | name, | ||
const char * | color, | ||
float | nstd | ||
) |
Initialize statistics.
[out] | statistics | pointer to statistics structure |
category | category (class) | |
name | class name | |
color | class color | |
nstd | standard deviation |
Definition at line 45 of file iclass_statistics.c.
References IClass_statistics::band_histo, IClass_statistics::band_max, IClass_statistics::band_mean, IClass_statistics::band_min, IClass_statistics::band_product, IClass_statistics::band_range_max, IClass_statistics::band_range_min, IClass_statistics::band_stddev, IClass_statistics::band_sum, IClass_statistics::cat, IClass_statistics::color, G_debug(), G_store(), IClass_statistics::name, IClass_statistics::nbands, IClass_statistics::ncells, IClass_statistics::nstd, and NULL.
void I_iclass_statistics_get_cat | ( | IClass_statistics * | statistics, |
int * | cat | ||
) |
Get category (class).
statistics | pointer to statistics structure | |
[out] | cat | category |
Definition at line 475 of file iclass_statistics.c.
References IClass_statistics::cat.
void I_iclass_statistics_get_color | ( | IClass_statistics * | statistics, |
const char ** | color | ||
) |
Get category (class) color.
statistics | pointer to statistics structure | |
[out] | color | category color |
Definition at line 506 of file iclass_statistics.c.
References IClass_statistics::color.
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.
statistics | pointer to statistics structure | |
band | band index | |
cat | raster cell category | |
[out] | value | number of cells in category |
Definition at line 676 of file iclass_statistics.c.
References _, IClass_statistics::band_histo, G_warning(), and IClass_statistics::nbands.
int I_iclass_statistics_get_max | ( | IClass_statistics * | statistics, |
int | band, | ||
int * | max | ||
) |
Get maximum value in band.
statistics | pointer to statistics structure | |
band | band index | |
[out] | max | maximum value |
Definition at line 580 of file iclass_statistics.c.
References _, IClass_statistics::band_max, G_warning(), and IClass_statistics::nbands.
int I_iclass_statistics_get_mean | ( | IClass_statistics * | statistics, |
int | band, | ||
float * | mean | ||
) |
Get mean of cell category values in band.
statistics | pointer to statistics structure | |
band | band index | |
[out] | mean | mean |
Definition at line 626 of file iclass_statistics.c.
References _, IClass_statistics::band_mean, G_warning(), and IClass_statistics::nbands.
int I_iclass_statistics_get_min | ( | IClass_statistics * | statistics, |
int | band, | ||
int * | min | ||
) |
Get minimum value in band.
statistics | pointer to statistics structure | |
band | band index | |
[out] | min | minimum value |
Definition at line 557 of file iclass_statistics.c.
References _, IClass_statistics::band_min, G_warning(), and IClass_statistics::nbands.
void I_iclass_statistics_get_name | ( | IClass_statistics * | statistics, |
const char ** | name | ||
) |
Get category (class) name.
statistics | pointer to statistics structure | |
[out] | name | category name |
Definition at line 490 of file iclass_statistics.c.
References IClass_statistics::name.
void I_iclass_statistics_get_nbands | ( | IClass_statistics * | statistics, |
int * | nbands | ||
) |
Get number of bands.
statistics | pointer to statistics structure | |
[out] | nbands | number of bands |
Definition at line 463 of file iclass_statistics.c.
References IClass_statistics::nbands.
void I_iclass_statistics_get_ncells | ( | IClass_statistics * | statistics, |
int * | ncells | ||
) |
Get number of cells in training areas.
statistics | pointer to statistics structure | |
[out] | ncells | number of cells |
Definition at line 519 of file iclass_statistics.c.
References IClass_statistics::ncells.
void I_iclass_statistics_get_nstd | ( | IClass_statistics * | statistics, |
float * | nstd | ||
) |
Get the multiplier of standard deviation.
statistics | pointer to statistics structure | |
[out] | nstd | multiplier of standard deviation |
Definition at line 531 of file iclass_statistics.c.
References IClass_statistics::nstd.
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.
statistics | statistics object | |
band1 | index of first band | |
band2 | index of second band | |
[out] | value | product value |
Definition at line 708 of file iclass_statistics.c.
References _, IClass_statistics::band_product, G_warning(), and IClass_statistics::nbands.
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.
statistics | pointer to statistics structure | |
band | band index | |
[out] | max | maximum value |
Definition at line 754 of file iclass_statistics.c.
References _, IClass_statistics::band_range_max, G_warning(), and IClass_statistics::nbands.
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.
statistics | pointer to statistics structure | |
band | band index | |
[out] | min | minimum value |
Definition at line 731 of file iclass_statistics.c.
References _, IClass_statistics::band_range_min, G_warning(), and IClass_statistics::nbands.
int I_iclass_statistics_get_stddev | ( | IClass_statistics * | statistics, |
int | band, | ||
float * | stddev | ||
) |
Get standard deviation of cell category values in band.
statistics | pointer to statistics structure | |
band | band index | |
[out] | stddev | standard deviation |
Definition at line 649 of file iclass_statistics.c.
References _, IClass_statistics::band_stddev, G_warning(), and IClass_statistics::nbands.
int I_iclass_statistics_get_sum | ( | IClass_statistics * | statistics, |
int | band, | ||
float * | sum | ||
) |
Get sum of values in band.
statistics | pointer to statistics structure | |
band | band index | |
[out] | sum | sum |
Definition at line 603 of file iclass_statistics.c.
References _, IClass_statistics::band_sum, G_warning(), and IClass_statistics::nbands.
void I_iclass_statistics_set_nstd | ( | IClass_statistics * | statistics, |
float | nstd | ||
) |
Set the multiplier of standard deviation.
statistics | pointer to statistics structure |
nstd | multiplier of standard deviation |
Definition at line 542 of file iclass_statistics.c.
References IClass_statistics::nstd.
int I_iclass_write_signatures | ( | struct Signature * | sigs, |
const char * | group, | ||
const char * | sub_group, | ||
const char * | file_name | ||
) |
Write signtures to signature file.
sigs | pointer to signatures |
group | image group |
sub_group | image subgroup |
file_name | name of signature file |
Definition at line 109 of file iclass_signatures.c.
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
scatt_id | scatter plot id | |
n_bands | number of bands | |
[out] | b_1_id | id of band1 |
[out] | b_2_id | id of band2 |
Definition at line 39 of file iscatt_structs.c.
Referenced by I_sc_insert_scatt_data().
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.
ref |
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().
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.
int I_init_signatures | ( | struct Signature * | , |
int | |||
) |
Definition at line 4 of file sig.c.
References Signature::nbands, Signature::nsigs, NULL, Signature::sig, and Signature::title.
Referenced by I_cluster_begin(), I_cluster_clear(), I_free_signatures(), and I_iclass_init_signatures().
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().
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.
Warning: calls Rast_set_window
patch_rast | name of raster map |
cat_rast_region | region of category raster file |
cat_rast | path to category raster file |
Definition at line 236 of file iscatt_core.c.
int I_list_group | ( | const char * | group, |
const struct Ref * | ref, | ||
FILE * | fd | ||
) |
Prints maps in a group (fancy version)
group | group name |
ref | group reference (set with I_get_group_ref()) |
fd | where to print (typically stdout) |
Definition at line 26 of file list_gp.c.
References _, Ref::file, Ref_Files::mapset, max, Ref_Files::name, and Ref::nfiles.
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.
ref | group reference (set with I_get_group_ref()) |
fd | where to print (typically stdout) |
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().
int I_list_subgroup | ( | const char * | group, |
const char * | subgroup, | ||
const struct Ref * | ref, | ||
FILE * | fd | ||
) |
Prints maps in a subgroup (fancy version)
group | group name |
subgroup | subgroup name |
ref | group reference (set with I_get_subgroup_ref()) |
fd | where to print (typically stdout) |
Definition at line 81 of file list_subgp.c.
References _, Ref::file, Ref_Files::mapset, max, Ref_Files::name, and Ref::nfiles.
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.
ref | group reference (set with I_get_subgroup_ref()) |
fd | where to print (typically stdout) |
Definition at line 134 of file list_subgp.c.
References I_list_group_simple().
char** I_list_subgroups | ( | const char * | group, |
int * | subgs_num | ||
) |
Get list of subgroups which a group contatins.
group | group name | |
[out] | subgs_num | number of subgroups which the group contains |
Definition at line 52 of file list_subgp.c.
References G_mapset(), and list_subgroups().
char** I_list_subgroups2 | ( | const char * | group, |
const char * | mapset, | ||
int * | subgs_num | ||
) |
Get list of subgroups which a group contatins.
group | group name | |
mapset | mapset name | |
[out] | subgs_num | number of subgroups which the group contains |
Definition at line 67 of file list_subgp.c.
References list_subgroups().
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().
void* I_malloc | ( | size_t | ) |
Definition at line 6 of file imagery/alloc.c.
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.
merged_arr | array which will be overlayd with overlay_arr |
overlay_arr | array to be merged_arr overlaid with |
rows | number of rows for the both arrays |
cols | number of columns for the both arrays |
alpha | transparency (0-1) of the overlay array for merging |
Definition at line 862 of file iscatt_core.c.
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.
cp | |
e1 | |
n1 | |
e2 | |
n2 | |
status |
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.
int I_new_signature | ( | struct Signature * | ) |
Definition at line 16 of file sig.c.
References One_Sig::desc, G_calloc, G_realloc, One_Sig::have_color, One_Sig::mean, Signature::nbands, Signature::nsigs, SIG, Signature::sig, One_Sig::status, and One_Sig::var.
Referenced by I_iclass_add_signature().
Definition at line 73 of file sigset.c.
References ClassSig::classnum, SigSet::ClassSig, G_malloc, G_realloc, SigSet::nclasses, ClassSig::nsubclasses, NULL, SIGNATURE_TYPE_MIXED, ClassSig::title, ClassSig::type, and ClassSig::used.
Definition at line 93 of file sigset.c.
References SubSig::cnst, G_calloc, G_malloc, G_realloc, SubSig::means, SubSig::N, SigSet::nbands, ClassSig::nsubclasses, SubSig::pi, SubSig::R, SubSig::Rinv, ClassSig::SubSig, and SubSig::used.
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.
group | |
cp |
Definition at line 153 of file points.c.
References _, G_mapset(), G_warning(), I_fopen_group_file_new(), NULL, and POINT_FILE.
int I_put_group | ( | const char * | ) |
Definition at line 55 of file group.c.
References G_fopen_new(), GROUPFILE, and NULL.
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.
group | |
ref |
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.
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.
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.
group | |
subgroup | |
ref |
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.
group | |
location | |
mapset |
Definition at line 62 of file target.c.
References I_fopen_group_file_new(), and NULL.
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.
polygon | array of polygon coordinates [x, y, x, y...] | |
pol_n_pts | number of points in the polygon array | |
val | value to be assigned to cells, which belong to plygon | |
rast_region | region of raster | |
[out] | rast | raster to be pologyn rasterized in |
Definition at line 948 of file iscatt_core.c.
int I_read_one_signature | ( | FILE * | , |
struct Signature * | |||
) |
Definition at line 52 of file sig.c.
Referenced by 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.
int I_ReadSigSet | ( | FILE * | , |
struct SigSet * | |||
) |
Definition at line 124 of file sigset.c.
References I_InitSigSet().
void* I_realloc | ( | void * | , |
size_t | |||
) |
Definition at line 16 of file imagery/alloc.c.
int I_sc_add_cat | ( | struct scCats * | cats | ) |
Add category.
Category represents group of scatter plots.
cats | pointer to scCats struct |
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.
void I_sc_free_cats | ( | struct scCats * | cats | ) |
Free data of struct scCats, the structure itself remains allocated.
cats | pointer 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.
void I_sc_init_cats | ( | struct scCats * | cats, |
int | n_bands, | ||
int | type | ||
) |
Initialize structure for storing scatter plots data.
cats | pointer to scCats struct |
n_bands | number of bands |
type | SC_SCATT_DATA - stores scatter plots |
type | SC_SCATT_CONDITIONS - stores selected areas in scatter plots |
Definition at line 88 of file iscatt_structs.c.
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).
cats | pointer to scCats struct |
scarr_data | pointer to scdScattData struct |
cat_id | id number of category |
scatt_id | id number of scatter plot |
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.
void I_scd_init_scatt_data | ( | struct scdScattData * | scatt_data, |
int | type, | ||
int | n_vals, | ||
void * | data | ||
) |
Insert scatter plot data.
scatt_data | pointer to existing struct scdScattData |
type | SC_SCATT_DATA for scatter plots or SC_SCATT_CONDITIONS for selected areas in scatter plot |
n_vals | number of data values |
data | array of values (unsigned char for SC_SCATT_CONDITIONS, unsigned int for SC_SCATT_DATA) |
Definition at line 261 of file iscatt_structs.c.
int I_SetClassTitle | ( | struct ClassSig * | , |
const char * | |||
) |
int I_SetSigTitle | ( | struct SigSet * | , |
const char * | |||
) |
int I_SigSetNBands | ( | struct SigSet * | , |
int | |||
) |
Definition at line 66 of file sigset.c.
References SigSet::nbands.
int I_SigSetNClasses | ( | struct SigSet * | ) |
Definition at line 31 of file sigset.c.
References SigSet::ClassSig, count, SigSet::nclasses, and ClassSig::used.
double I_stddev | ( | double | , |
double | , | ||
int | |||
) |
Definition at line 16 of file var.c.
References I_variance().
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.
src | |
n | |
dst |
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.
double I_variance | ( | double | , |
double | , | ||
int | |||
) |
Definition at line 8 of file var.c.
Referenced by I_stddev().
int I_WriteSigSet | ( | FILE * | , |
const struct SigSet * | |||
) |
Definition at line 319 of file sigset.c.
References ClassSig::classnum, SigSet::ClassSig, I_GetClassTitle(), I_GetSigTitle(), SubSig::means, SigSet::nbands, SigSet::nclasses, ClassSig::nsubclasses, SubSig::pi, SubSig::R, ClassSig::SubSig, ClassSig::type, and ClassSig::used.