18 #include <sys/types.h>
26 G_warning(
"Vect_read_line() %s",
_(
"for this format/level not supported"));
30 #if !defined HAVE_OGR || !defined HAVE_POSTGRES
34 G_fatal_error(
_(
"Requested format is not compiled in this version"));
41 G_fatal_error(
_(
"Requested format is not compiled in this version"));
55 {read_dummy, format, format},
56 {read_dummy, format, format}
63 {read_dummy, format, format}
99 G_debug(3,
"Vect_get_next_line()");
102 G_warning(
_(
"Vector map is not open for reading"));
138 G_warning(
_(
"Vector map is not open for reading"));
142 ret = (*Read_next_line_array[Map->
format][Map->
level])(Map, line_p, line_c);
144 G_warning(
_(
"Unable to read feature %d from vector map <%s>"),
173 G_debug(3,
"Vect_read_line(): line = %d", line);
176 G_warning(
_(
"Vector map is not open for reading"));
181 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
185 ret = (*Read_line_array[Map->
format])(Map, line_p, line_c, line);
188 G_warning(
_(
"Unable to read feature %d from vector map <%s>"), line,
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
int V2_read_line_nat(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read vector feature on topological level (level 2) - native format - internal use only.
int V2_read_next_line_nat(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next vector feature on topological level (level 2) - native format - internal use only.
int V1_read_next_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *)
int V2_read_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *, int)
const char * Vect_get_full_name(struct Map_info *)
Get fully qualified name of vector map.
int V1_read_next_line_nat(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next vector feature on non-topological level (level 1) - native format - internal use only.
int V2_read_next_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *)
int V1_read_next_line_ogr(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next feature from OGR layer. Skip empty features (level 1 without topology).
int V2_read_next_line_ogr(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next feature from OGR layer on topological level.
int V2_read_line_sfa(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Reads feature from OGR/PostGIS layer on topological level.
#define VECT_OPEN(Map)
Check if vector map is open.
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
plus_t next_line
Feature id for sequential access.
int format
Map format (native, ogr, postgis)
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.
plus_t n_nodes
Current number of topological features derived from vector geometries.
struct P_area ** Area
Array of areas.
plus_t n_isles
Current number of isles.
struct P_isle ** Isle
Array of isles.
struct P_node ** Node
Array of nodes.
plus_t n_areas
Current number of areas.
Feature geometry info - coordinates.
off_t Vect_get_line_offset(struct Map_info *Map, int line)
Get feature offset (topological level required)
int Vect_get_next_line_id(struct Map_info *Map)
Get line id for sequential reading.
int Vect_read_line(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
Read vector feature (topological level required)
int Vect_area_alive(struct Map_info *Map, int area)
Check if area is alive or dead (topological level required)
int Vect_node_alive(struct Map_info *Map, int node)
Check if node is alive or dead (topological level required)
int Vect_isle_alive(struct Map_info *Map, int isle)
Check if isle is alive or dead (topological level required)
int Vect_line_alive(struct Map_info *Map, int line)
Check if feature is alive or dead (topological level required)
int Vect_read_next_line(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
Read next vector feature.