GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
c_point.c File Reference

Cluster library - Add point. More...

#include <grass/raster.h>
#include <grass/cluster.h>
Include dependency graph for c_point.c:

Go to the source code of this file.

Functions

int I_cluster_point (struct Cluster *C, DCELL *x)
 Adds the point x to the list of data points to be "clustered". More...
 
int I_cluster_begin_point_set (struct Cluster *C, int n)
 Begin point set. More...
 
int I_cluster_point_part (struct Cluster *C, DCELL x, int band, int n)
 ? More...
 
int I_cluster_end_point_set (struct Cluster *C, int n)
 ? More...
 

Detailed Description

Cluster library - Add point.

(C) 2001-2009 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
Original author CERL

Definition in file c_point.c.

Function Documentation

int I_cluster_begin_point_set ( struct Cluster C,
int  n 
)

Begin point set.

Parameters
Cpointer to Cluster structure
n?
Returns
0 on success
-1 on error

Definition at line 71 of file c_point.c.

int I_cluster_end_point_set ( struct Cluster C,
int  n 
)

?

Parameters
Cpointer to Cluster structure
n?
Returns
number of points

Definition at line 109 of file c_point.c.

References Cluster::nbands, Cluster::npoints, and Cluster::points.

int I_cluster_point ( struct Cluster C,
DCELL x 
)

Adds the point x to the list of data points to be "clustered".

The dimension of x must agree with the number of bands specified in the initializing call to I_cluster_begin()

Note: if all values in x are zero, the point is rejected

Returns
0 ok
-1 out of memory, point not added
1 all values are null, point not added

Definition at line 32 of file c_point.c.

References Cluster::band_sum, Cluster::band_sum2, Cluster::nbands, Cluster::npoints, Cluster::points, and Rast_is_d_null_value().

int I_cluster_point_part ( struct Cluster C,
DCELL  x,
int  band,
int  n 
)

?

Parameters
Cpointer to Cluster structure
xcell value
bandband number
n?
Returns
0 ok
-1 out of memory, point not added
1 all values are null, point not added

Definition at line 88 of file c_point.c.

References Cluster::band_sum, Cluster::band_sum2, Cluster::npoints, Cluster::points, Rast_is_d_null_value(), and x.