GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
iclass_bands.c File Reference

Imagery library - functions for wx.iclass. More...

#include <grass/imagery.h>
#include <grass/raster.h>
#include "iclass_local_proto.h"
Include dependency graph for iclass_bands.c:

Go to the source code of this file.

Functions

void open_band_files (struct Ref *refer, CELL ***band_buffer, int **band_fd)
 Open and allocate space for the group band files. More...
 
void close_band_files (struct Ref *refer, CELL **band_buffer, int *band_fd)
 Close and free space for the group band files. More...
 
void read_band_row (CELL **band_buffer, int *band_fd, int nbands, int row)
 Read one row of each band. More...
 

Detailed Description

Imagery library - functions for wx.iclass.

Computation based on training areas for supervised classification. Based on i.class module (GRASS 6).

Reading bands cell category values.

Copyright (C) 1999-2007, 2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
David Satnik, Central Washington University (original author)
Markus Neteler <neteler itc.it> (i.class module)
Bernhard Reiter <bernhard intevation.de> (i.class module)
Brad Douglas <rez touchofmadness.com>(i.class module)
Glynn Clements <glynn gclements.plus.com> (i.class module)
Hamish Bowman <hamish_b yahoo.com> (i.class module)
Jan-Oliver Wagner <jan intevation.de> (i.class module)
Anna Kratochvilova <kratochanna gmail.com> (rewriting for wx.iclass)
Vaclav Petras <wenzeslaus gmail.com> (rewriting for wx.iclass)

Definition in file iclass_bands.c.

Function Documentation

◆ close_band_files()

void close_band_files ( struct Ref refer,
CELL **  band_buffer,
int *  band_fd 
)

Close and free space for the group band files.

Parameters
referpointer to band files structure
band_bufferbuffer to read one row of each band
band_fdband files descriptors

Definition at line 67 of file iclass_bands.c.

References G_debug(), G_free(), Ref::nfiles, and Rast_close().

Referenced by I_iclass_analysis(), and I_iclass_create_raster().

◆ open_band_files()

void open_band_files ( struct Ref refer,
CELL ***  band_buffer,
int **  band_fd 
)

Open and allocate space for the group band files.

Parameters
referpointer to band files structure
[out]band_bufferbuffer to read one row of each band
[out]band_fdband files descriptors

Definition at line 39 of file iclass_bands.c.

References Ref::file, G_debug(), G_malloc, Ref_Files::mapset, name, Ref_Files::name, Ref::nfiles, Rast_allocate_c_buf(), and Rast_open_old().

Referenced by I_iclass_analysis(), and I_iclass_create_raster().

◆ read_band_row()

void read_band_row ( CELL **  band_buffer,
int *  band_fd,
int  nbands,
int  row 
)

Read one row of each band.

Parameters
band_bufferbuffer to read one row of each band
band_fdband files descriptors
nbandsnumber of band files
rowdata row

Definition at line 91 of file iclass_bands.c.

References G_debug(), and Rast_get_c_row_nomask().