~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to raster/r.to.vect/util.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#endif
9
9
 
10
10
#include <grass/gis.h>
 
11
#include <grass/raster.h>
11
12
#include <grass/dbmi.h>
12
 
#include <grass/Vect.h>
 
13
#include <grass/vector.h>
13
14
#include <grass/glocale.h>
14
15
#include "global.h"
15
16
 
101
102
            /* bytes and cast the buf variable to char * before */
102
103
            /* incrementing */
103
104
            p = ((char *)buf) + data_size;
104
 
            G_get_raster_row(input_fd, p, row_count++, data_type);
 
105
            Rast_get_row(input_fd, p, row_count++, data_type);
105
106
            p = buf;
106
 
            G_set_null_value(p, 1, data_type);
 
107
            Rast_set_null_value(p, 1, data_type);
107
108
 
108
109
            /* Again we need to cast p to char * under the */
109
110
            /* assumption that the increment is the proper */
110
111
            /* number of bytes. */
111
112
            p = ((char *)p) + (row_length + 1) * data_size;
112
 
            G_set_null_value(p, 1, data_type);
 
113
            Rast_set_null_value(p, 1, data_type);
113
114
        }
114
115
    }
115
116
    return (row_length + 2);
117
118
 
118
119
static int blank_line(void *buf)
119
120
{
120
 
    G_set_null_value(buf, row_length + 2, data_type);
 
121
    Rast_set_null_value(buf, row_length + 2, data_type);
121
122
 
122
123
    return 0;
123
124
}
140
141
    if (has_cats) {
141
142
        char *lab;
142
143
 
143
 
        lab = G_get_cat(val, &RastCats);        /*cats are loaded only for CELL type */
 
144
        lab = Rast_get_c_cat(&val, &RastCats);  /*cats are loaded only for CELL type */
144
145
 
145
146
        db_set_string(&label, lab);
146
147
        db_double_quote_string(&label);