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) {
88 list.box[found].N, 0.0);
92 _(
"Unable to construct centroid for area %d. Skipped."),
101 if (line_c !=
NULL) {
110 if (!line_p && !line_c)
118 if (type != Line->
type) {
119 G_warning(
_(
"Unexpected feature type (%d) - should be (%d)"), type,
126 G_fatal_error(
_(
"GRASS is not compiled with OGR/PostgreSQL support"));
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 Vect_reset_cats(struct line_cats *)
Reset category structure to make sure cats structure is clean to be re-used.
int Vect_cat_set(struct line_cats *, int, int)
Add new field/cat to category structure if doesn't exist yet.
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 Vect_get_area_box(struct Map_info *, int, struct bound_box *)
Get bounding box of area.
int Vect_select_lines_by_box(struct Map_info *, const struct bound_box *, int, struct boxlist *)
Select lines with bounding boxes by box.
void Vect_reset_line(struct line_pnts *)
Reset line.
int V1_read_line_pg(struct Map_info *, struct line_pnts *, struct line_cats *, off_t)
int Vect_append_point(struct line_pnts *, double, double, double)
Appends one point to the end of a line.
#define GV_FORMAT_POSTGIS
PostGIS format.
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.
int format
Map format (native, ogr, postgis)
struct Plus_head plus
Plus info (topology, version, ...)
off_t offset
Offset in coor file for line.
void * topo
Topology info.
plus_t area
Area number, negative for duplicate centroid.
struct P_line ** Line
Array of vector geometries.
plus_t n_lines
Current number of lines.
plus_t n_areas
Current number of areas.
List of bounding boxes with id.
Feature geometry info - coordinates.