GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Go to the source code of this file.
Macros | |
#define | POINT_FILE "POINTS" |
Functions | |
int | I_new_control_point (struct Control_Points *cp, double e1, double n1, double e2, double n2, int status) |
add new control point More... | |
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... | |
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 113 of file points.c.
References _, G_mapset(), G_warning(), I_fopen_group_file_old(), NULL, and POINT_FILE.
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 56 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_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 148 of file points.c.
References _, G_mapset(), G_warning(), I_fopen_group_file_new(), NULL, and POINT_FILE.