46 return read_line_nat(
Map, Points,
Cats, offset);
78 G_debug(3,
"V1_read_next_line_nat()");
80 if (
Map->constraint.region_flag)
92 if (
Map->constraint.type_flag) {
98 if (
line_p &&
Map->constraint.region_flag) {
106 if (
line_c &&
Map->constraint.field_flag) {
142 G_debug(3,
"V2_read_line_nat(): line = %d", line);
145 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
149 Line =
Map->plus.Line[line];
151 G_warning(
_(
"Attempt to access dead feature %d"), line);
186 G_debug(3,
"V2_read_next_line_nat()");
188 if (
Map->constraint.region_flag)
192 line =
Map->next_line;
194 if (line >
Map->plus.n_lines)
197 Line =
Map->plus.Line[line];
204 if (
Map->constraint.type_flag) {
206 if (!(Line->
type &
Map->constraint.type)) {
217 if (
line_p &&
Map->constraint.region_flag) {
225 if (
line_c &&
Map->constraint.field_flag) {
253 register int i,
dead = 0;
261 G_debug(3,
"Vect__Read_line_nat: offset = %lu", (
unsigned long)offset);
263 Map->head.last_offset = offset;
291 if (
Map->head.coor_version.minor == 1) {
300 G_debug(3,
" n_cats = %d", n_cats);
308 if (
Map->head.coor_version.minor == 1) {
314 for (i = 0; i < n_cats; i++) {
325 if (
Map->head.coor_version.minor == 1) {
344 G_debug(3,
" n_points = %d", n_points);
356 if (
Map->head.with_z) {
361 for (i = 0; i < n_points; i++)
366 if (
Map->head.with_z)
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.
off_t offset
Offset in coor file for line.
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.