28 G_debug(3,
"dig_write_cidx_head()");
61 for (i = 0; i < plus->
n_cidx; i++) {
86 for (
t = 0;
t <
ci->n_types;
t++) {
121 unsigned char buf[5];
129 plus->
version.cidx.major = buf[0];
130 plus->
version.cidx.minor = buf[1];
131 plus->
version.cidx.back_major = buf[2];
132 plus->
version.cidx.back_minor = buf[3];
137 "Cidx header: file version %d.%d , supported from GRASS version %d.%d",
141 G_debug(3,
" byte order %d", byte_order);
153 G_debug(1,
"Category index format version %d.%d",
155 G_fatal_error(
_(
"This version of GRASS (%d.%d) is too old to read "
156 "this category index format."
157 " Try to rebuild topology or upgrade GRASS to at "
158 "least version %d."),
164 G_warning(
"Your GRASS version does not fully support category index "
165 "format %d.%d of the vector."
166 " Consider to rebuild topology or upgrade GRASS.",
199 for (i = 0; i < plus->
n_cidx; i++) {
224 for (
t = 0;
t <
ci->n_types;
t++) {
259 for (i = 0; i < plus->
n_cidx; i++) {
267 for (
j = 0;
j <
ci->n_cats;
j++)
274 for (
j = 0;
j <
ci->n_cats;
j++)
304 G_debug(3,
"Cannot read cidx head");
316 for (i = 0; i < plus->
n_cidx; i++) {
321 ci->a_cats =
ci->n_cats;
331 for (
j = 0;
j <
ci->n_cats;
j++)
int dig_write_cidx(struct gvfile *fp, struct Plus_head *plus)
int dig_read_cidx(struct gvfile *fp, struct Plus_head *plus, int head_only)
Read spatial index file.
int dig_write_cidx_head(struct gvfile *fp, struct Plus_head *plus)
int dig_read_cidx_head(struct gvfile *fp, struct Plus_head *plus)
Read header of cidx file.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
#define GV_CIDX_VER_MINOR
#define GV_CIDX_EARLIEST_MINOR
#define GV_CIDX_EARLIEST_MAJOR
#define GV_CIDX_VER_MAJOR
int dig__fread_port_O(off_t *, size_t, struct gvfile *, size_t)
Read off_ts from the Portable Vector Format.
int dig__fwrite_port_C(const char *, size_t, struct gvfile *)
Write chars to the Portable Vector Format.
void dig_init_portable(struct Port_info *, int)
Set Port_info structure to byte order of file.
int dig__fread_port_L(long *, size_t, struct gvfile *)
Read longs from the Portable Vector Format.
int dig__fwrite_port_L(const long *, size_t, struct gvfile *)
Write longs to the Portable Vector Format.
int dig__fwrite_port_I(const int *, size_t, struct gvfile *)
Write integers to the Portable Vector Format.
off_t dig_ftell(struct gvfile *file)
Get struct gvfile position.
int dig_set_cur_port(struct Port_info *)
Set current Port_info structure.
void dig_cidx_free(struct Plus_head *)
void dig_rewind(struct gvfile *file)
Rewind file position.
int dig__fread_port_C(char *, size_t, struct gvfile *)
Read chars from the Portable Vector Format.
int dig_cidx_init(struct Plus_head *)
Initialize Plus_head structure (cidx)
int dig__fread_port_I(int *, size_t, struct gvfile *)
Read integers from the Portable Vector Format.
int dig_fseek(struct gvfile *file, off_t offset, int whence)
Set struct gvfile position.
int dig_type_from_store(int)
Convert type from store type.
int dig__fwrite_port_O(const off_t *, size_t, struct gvfile *, size_t)
Write off_ts to the Portable Vector Format.
int dig_type_to_store(int)
Convert type to store type.
Basic topology-related info.
int n_cidx
Number of category indexes (one for each field/layer)
struct Port_info cidx_port
Portability information for category index.
off_t coor_size
Size of coor file.
struct Plus_head::@9 version
Backward compatibility version info.
int off_t_size
Offset size.
int a_cidx
Allocated space for category indexes.
int cidx_up_to_date
Category index to be updated.
struct Version_info cidx
Version info for category index file.
long cidx_head_size
Category index header size.
#define GRASS_VERSION_MINOR
#define GRASS_VERSION_MAJOR