43 #if defined HAVE_OGR || defined HAVE_POSTGRES 47 G_debug(4,
"V2_read_line_sfa() line = %d", line);
50 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
56 G_warning(
_(
"Attempt to access dead feature %d"), line);
79 for (i = 0; i < list.
n_values; i++) {
80 if (list.
id[i] == line) {
90 G_warning(
_(
"Unable to construct centroid for area %d. Skipped."),
108 if (!line_p && !line_c)
116 if (type != Line->
type) {
117 G_warning(
_(
"Unexpected feature type (%d) - should be (%d)"),
124 G_fatal_error(
_(
"GRASS is not compiled with OGR/PostgreSQL support"));
int Vect_get_area_box(const struct Map_info *, int, struct bound_box *)
Get bounding box of area.
plus_t n_areas
Current number of areas.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
plus_t area
Area number, negative for duplicate centroid.
off_t offset
Offset in coor file for line.
struct P_line ** Line
Array of vector geometries.
int V1_read_line_ogr(struct Map_info *, struct line_pnts *, struct line_cats *, off_t)
Read feature from OGR layer at given offset (level 1 without topology)
int n_values
Number of items in the list.
struct bound_box * box
Array of bounding boxes.
plus_t n_lines
Current number of lines.
int Vect_select_lines_by_box(struct Map_info *, const struct bound_box *, int, struct boxlist *)
Select lines with bounding boxes by box.
Feature geometry info - coordinates.
void * topo
Topology info.
int Vect_append_point(struct line_pnts *, double, double, double)
Appends one point to the end of a line.
struct Plus_head plus
Plus info (topology, version, ...)
int V1_read_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *, off_t)
Read feature from PostGIS layer at given offset (level 1 without topology)
int Vect_reset_cats(struct line_cats *)
Reset category structure to make sure cats structure is clean to be re-used.
int dig_init_boxlist(struct boxlist *, int)
int V2_read_line_sfa(struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line)
Reads feature from OGR/PostGIS layer on topological level.
#define GV_FORMAT_POSTGIS
PostGIS format.
List of bounding boxes with id.
void G_warning(const char *,...) __attribute__((format(printf
int format
Map format (native, ogr, postgis)
int G_debug(int, const char *,...) __attribute__((format(printf
void Vect_reset_line(struct line_pnts *)
Reset line.
int Vect_cat_set(struct line_cats *, int, int)
Add new field/cat to category structure if doesn't exist yet.