18 #include <sys/types.h>
46 return read_line_nat(Map, Points, Cats, offset);
78 G_debug(3,
"V1_read_next_line_nat()");
85 itype = read_line_nat(Map, line_p, line_c, offset);
141 G_debug(3,
"V2_read_line_nat(): line = %d", line);
144 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
150 G_warning(
_(
"Attempt to access dead feature %d"), line);
154 return read_line_nat(Map, line_p, line_c, Line->
offset);
185 G_debug(3,
"V2_read_next_line_nat()");
212 ret = read_line_nat(Map, line_p, line_c, Line->
offset);
252 register int i, dead = 0;
260 G_debug(3,
"Vect__Read_line_nat: offset = %lu", (
unsigned long)offset);
284 G_debug(3,
" type = %d, do_cats = %d dead = %d", type, do_cats, dead);
299 G_debug(3,
" n_cats = %d", n_cats);
313 for (i = 0; i < n_cats; i++) {
316 c->
field[i] = (int)field;
325 size = (off_t)(2 *
PORT_INT) * n_cats;
343 G_debug(3,
" n_points = %d", n_points);
360 for (i = 0; i < n_points; i++)
void G_warning(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
void Vect_line_box(const struct line_pnts *, struct bound_box *)
Get bounding box of line.
int Vect_cat_get(const struct line_cats *, int, int *)
Get first found category of given field.
int Vect_get_constraint_box(struct Map_info *, struct bound_box *)
Get constraint box.
int Vect_box_overlap(const struct bound_box *, const struct bound_box *)
Tests for overlap of two boxes.
#define PORT_DOUBLE
Sizes of types used in portable format (different names used in Vlib/ and diglib/ for the same thing)
int dig__fread_port_D(double *, size_t, struct gvfile *)
Read doubles from the Portable Vector Format.
int dig_alloc_points(struct line_pnts *, int)
allocate room for 'num' X and Y arrays in struct line_pnts
off_t dig_ftell(struct gvfile *file)
Get struct gvfile position.
int dig_set_cur_port(struct Port_info *)
Set current Port_info structure.
int dig__fread_port_C(char *, size_t, struct gvfile *)
Read chars from the Portable Vector Format.
int dig__fread_port_S(short *, size_t, struct gvfile *)
Read shorts from the Portable Vector Format.
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_alloc_cats(struct line_cats *, int)
Allocate room for 'num' fields and category arrays in struct line_cats.
int V2_read_line_nat(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
Read vector feature on topological level (level 2) - native format - internal use only.
int V1_read_next_line_nat(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
Read next vector feature on non-topological level (level 1) - native format - internal use only.
int V1_read_line_nat(struct Map_info *Map, struct line_pnts *Points, struct line_cats *Cats, off_t offset)
Read vector feature on non-topological level (level 1) - native format - internal use only.
int V2_read_next_line_nat(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
Read next vector feature on topological level (level 2) - native format - internal use only.
struct gvfile dig_fp
GV file pointer (native format only)
struct dig_head head
Header info.
int field
Field number constraint (see line_cats structure)
int field_flag
Non-zero value to enable field constraint.
plus_t next_line
Feature id for sequential access.
int type
Feature type constraint.
int type_flag
Non-zero value to enable feature type constraint.
struct Map_info::@11 constraint
Constraints for sequential feature access.
int region_flag
Non-zero value to enable region constraint.
struct Plus_head plus
Plus info (topology, version, ...)
off_t offset
Offset in coor file for line.
struct P_line ** Line
Array of vector geometries.
plus_t n_lines
Current number of lines.
int minor
Current version (minor)
struct Version_info coor_version
Version info for coor file.
off_t last_offset
Offset of last read line.
int with_z
2D/3D vector data
struct Port_info port
Portability information.
int * field
Array of layers (fields)
int * cat
Array of categories.
int n_cats
Number of categories attached to element.
Feature geometry info - coordinates.
double * y
Array of Y coordinates.
double * x
Array of X coordinates.
int n_points
Number of points.
double * z
Array of Z coordinates.