grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

points.c File Reference
#include <grass/imagery.h>
#include <grass/glocale.h>
Include dependency graph for points.c:

Go to the source code of this file.

Macros

#define POINT_FILE   "POINTS"
 

Functions

static int I_read_control_points (FILE *fd, struct Control_Points *cp)
 
int I_new_control_point (struct Control_Points *cp, double e1, double n1, double e2, double n2, int status)
 add new control point More...
 
static int I_write_control_points (FILE *fd, const struct Control_Points *cp)
 
int I_get_control_points (const char *group, struct Control_Points *cp)
 read group control points More...
 
int I_put_control_points (const char *group, const struct Control_Points *cp)
 write group control points More...
 

Macro Definition Documentation

◆ POINT_FILE

#define POINT_FILE   "POINTS"

Definition at line 4 of file points.c.

Function Documentation

◆ 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(), I_read_control_points(), NULL, and POINT_FILE.

◆ 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, Control_Points::n1, Control_Points::n2, and Control_Points::status.

Referenced by I_read_control_points().

◆ 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(), I_write_control_points(), NULL, and POINT_FILE.

◆ I_read_control_points()

static int I_read_control_points ( FILE *  fd,
struct Control_Points cp 
)
static

◆ I_write_control_points()

static int I_write_control_points ( FILE *  fd,
const struct Control_Points cp 
)
static