49 G_debug(3,
"Vect_read_line_geos(): line = %d", line);
53 _(
"vector map is not opened"));
57 _(
"Vect_read_line_geos(): feature id %d is not reasonable "
58 "(max features in vector map <%s>: %d)"),
63 _(
"only native format supported"));
65 Line =
Map->plus.Line[line];
68 _(
"Attempt to read dead line"), line);
89 G_debug(3,
"Vect_read_area_geos(): area = %d", area);
93 G_fatal_error(
_(
"Vect_read_area_geos(): unable to read area id %d"),
99 for (i = 0; i <
nholes; i++) {
108 G_fatal_error(
_(
"Vect_read_area_geos(): unable to read isle id %d "
144 G_debug(3,
"Vect_line_to_geos(): type = %d",
type);
163 for (i = 0; i < points->
n_points; i++) {
213 G_debug(3,
" geos_type = point");
217 G_debug(3,
" geos_type = linestring");
225 G_debug(3,
" geos_type = linearring");
228 G_debug(3,
" geos_type = linestring");
257 G_debug(3,
"V2_read_line_geos(): line = %d", line);
259 Line =
Map->plus.Line[line];
263 _(
"Attempt to read dead line"), line);
325 if (
Map->head.coor_version.minor == 1) {
334 G_debug(3,
" n_cats = %d", n_cats);
336 if (
Map->head.coor_version.minor == 1) {
353 G_debug(3,
" n_points = %d dim = %d", n_points,
354 (
Map->head.with_z) ? 3 : 2);
356 x = (
double *)
G_malloc(n_points *
sizeof(
double));
357 y = (
double *)
G_malloc(n_points *
sizeof(
double));
358 if (
Map->head.with_z)
359 z = (
double *)
G_malloc(n_points *
sizeof(
double));
371 if (
Map->head.with_z) {
379 for (i = 0; i < n_points; i++) {
382 if (
Map->head.with_z)
416 G_debug(3,
"Vect_get_area_points_geos(): area = %d", area);
419 Area =
Plus->Area[area];
422 G_warning(
_(
"Attempt to read points of nonexistent area id %d"), area);
447 G_debug(3,
"Vect_get_isle_points_geos(): isle = %d",
isle);
472 for (i = 0; i <
n_lines; i++) {
475 G_debug(3,
" append line(%d) = %d", i, line);
488 G_debug(3,
" line n_points = %d", n_points);
495 for (i = 0; i <
n_lines; i++) {
498 for (
j = 0;
j < (
int)n_points;
j++, k++) {
505 if (
Map->head.with_z) {
512 for (
j = (
int)n_points - 1;
j > -1;
j--, k++) {
519 if (
Map->head.with_z) {
void G_free(void *)
Free allocated memory.
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_get_area_isle(struct Map_info *, int, int)
Returns isle id for area.
int Vect_get_area_num_isles(struct Map_info *, int)
Returns number of isles for given area.
const char * Vect_get_full_name(struct Map_info *)
Get fully qualified name of vector map.
#define GV_POINT
Feature types used in memory on run time (may change)
#define VECT_OPEN(Map)
Check if vector map is open.
#define GV_FORWARD
Line direction indicator forward/backward.
#define GV_FORMAT_NATIVE
Geometry data formats supported by lib Don't change GV_FORMAT_* values, this order is hardcoded in li...
int dig__fread_port_D(double *, size_t, struct gvfile *)
Read doubles from the Portable Vector Format.
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_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.
GEOSGeometry * Vect_read_line_geos(struct Map_info *Map, int line, int *type)
Read vector feature and stores it as GEOSGeometry instance.
GEOSCoordSequence * Vect_get_area_points_geos(struct Map_info *Map, int area)
Returns the polygon array of points, i.e. outer ring (shell)
GEOSCoordSequence * Vect_get_isle_points_geos(struct Map_info *Map, int isle)
Returns the polygon (isle) array of points (inner ring)
GEOSGeometry * Vect_line_to_geos(const struct line_pnts *points, int type, int with_z)
Create GEOSGeometry of given type from feature points.
GEOSGeometry * Vect_read_area_geos(struct Map_info *Map, int area)
Read vector area and stores it as GEOSGeometry instance (polygon)
plus_t n_lines
Number of boundary lines.
plus_t * lines
List of boundary lines.
plus_t * lines
List of boundary lines.
plus_t n_lines
Number of boundary lines.
off_t offset
Offset in coor file for line.
Basic topology-related info.
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.
struct GEOSCoordSeq_t GEOSCoordSequence
struct GEOSGeom_t GEOSGeometry