18 #include <sys/types.h> 22 static int read_dummy()
25 _(
"for this format/level not supported"));
29 #if !defined HAVE_OGR || !defined HAVE_POSTGRES 32 G_fatal_error(
_(
"Requested format is not compiled in this version"));
37 static int (*Read_next_line_array[][3]) () = {
47 read_dummy, format, format}
49 read_dummy, format, format}
56 read_dummy, format, format}
60 static int (*Read_line_array[]) () = {
90 G_debug(3,
"Vect_get_next_line()");
93 G_warning(
_(
"Vector map is not open for reading"));
129 G_warning(
_(
"Vector map is not open for reading"));
133 ret = (*Read_next_line_array[Map->
format][Map->
level]) (Map, line_p,
136 G_warning(
_(
"Unable to read feature %d from vector map <%s>"),
165 G_debug(3,
"Vect_read_line(): line = %d", line);
168 G_warning(
_(
"Vector map is not open for reading"));
173 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
177 ret = (*Read_line_array[Map->
format]) (Map, line_p, line_c, line);
180 G_warning(
_(
"Unable to read feature %d from vector map <%s>"),
plus_t n_areas
Current number of areas.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
off_t offset
Offset in coor file for line.
int V2_read_line_sfa(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Reads feature from OGR/PostGIS layer on topological level.
struct P_line ** Line
Array of vector geometries.
struct P_area ** Area
Array of areas.
struct P_node ** Node
Array of nodes.
int Vect_isle_alive(const struct Map_info *Map, int isle)
Check if isle is alive or dead (topological level required)
int V1_read_next_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next feature from PostGIS layer. Skip empty features (level 1 without topology). t This function implements sequential access.
int Vect_line_alive(const struct Map_info *Map, int line)
Check if feature is alive or dead (topological level required)
struct P_isle ** Isle
Array of isles.
plus_t n_isles
Current number of isles.
int V2_read_next_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next feature from PostGIS layer on topological level (simple feature access).
off_t Vect_get_line_offset(const struct Map_info *Map, int line)
Get feature offset (topological level required)
plus_t n_lines
Current number of lines.
Feature geometry info - coordinates.
#define VECT_OPEN(Map)
Check if vector map is open.
plus_t next_line
Feature id for sequential access.
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...
struct Plus_head plus
Plus info (topology, version, ...)
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 V2_read_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read feature from PostGIS layer on topological level.
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 Vect_get_next_line_id(const struct Map_info *Map)
Get line id for sequential reading.
const char * Vect_get_full_name(const struct Map_info *)
Get fully qualified name of vector map.
int Vect_node_alive(const struct Map_info *Map, int node)
Check if node is alive or dead (topological level required)
void G_warning(const char *,...) __attribute__((format(printf
int Vect_read_next_line(const struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c)
Read next vector feature.
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 Vect_read_line(const struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
Read vector feature (topological level required)
int format
Map format (native, ogr, postgis)
int G_debug(int, const char *,...) __attribute__((format(printf
int Vect_area_alive(const struct Map_info *Map, int area)
Check if area is alive or dead (topological level required)
plus_t n_nodes
Current number of topological features derived from vector geometries.
int V2_read_next_line_ogr(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next feature from OGR layer on topological level.