~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to imagery/i.vpoints/points.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "globals.h"
2
 
#include <grass/raster.h>
3
 
 
4
 
/* overlay ground control points on the display */
5
 
 
6
 
int display_points(int in_color)
7
 
{
8
 
 
9
 
    display_points_in_view(VIEW_MAP1, in_color,
10
 
                           group.points.e1, group.points.n1,
11
 
                           group.points.status, group.points.count);
12
 
 
13
 
    display_points_in_view(VIEW_MAP1_ZOOM, in_color,
14
 
                           group.points.e1, group.points.n1,
15
 
                           group.points.status, group.points.count);
16
 
 
17
 
    display_points_in_view(VIEW_MAP2, in_color,
18
 
                           group.points.e2, group.points.n2,
19
 
                           group.points.status, group.points.count);
20
 
 
21
 
    display_points_in_view(VIEW_MAP2_ZOOM, in_color,
22
 
                           group.points.e2, group.points.n2,
23
 
                           group.points.status, group.points.count);
24
 
 
25
 
    return 0;
26
 
}
27
 
 
28
 
int display_points_in_view(View * view, int in_color,
29
 
                           double *east, double *north, int *status,
30
 
                           int count)
31
 
{
32
 
    if (!view->cell.configured)
33
 
        return 1;
34
 
    while (count-- > 0) {
35
 
        if (in_color && (*status > 0))
36
 
            R_standard_color(GREEN);
37
 
        else if (in_color && (*status == 0))
38
 
            R_standard_color(RED);
39
 
        else
40
 
            R_standard_color(GREY);
41
 
        status++;
42
 
        display_one_point(view, *east++, *north++);
43
 
    }
44
 
 
45
 
    return 0;
46
 
}
47
 
 
48
 
int display_one_point(View * view, double east, double north)
49
 
{
50
 
    int row, col, x, y;
51
 
 
52
 
    row = northing_to_row(&view->cell.head, north) + .5;
53
 
    col = easting_to_col(&view->cell.head, east) + .5;
54
 
    y = row_to_view(view, row);
55
 
    x = col_to_view(view, col);
56
 
    if (In_view(view, x, y))
57
 
        dot(x, y);
58
 
 
59
 
    return 0;
60
 
}