GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-f63024f571
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

◆ I_cluster_begin_point_set()

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.

◆ I_cluster_end_point_set()

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.

◆ I_cluster_point()

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::nbands, Rast_is_d_null_value, and x.

◆ I_cluster_point_part()

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.