GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Vector library - GEOS powered WKT and WKB export. More...
Go to the source code of this file.
Functions | |
unsigned char * | Vect_read_area_to_wkb (struct Map_info *Map, int area, size_t *size) |
Read vector area and return it as Well Known Binary (WKB) unsigned char array. More... | |
char * | Vect_read_area_to_wkt (struct Map_info *Map, int area) |
Read vector area and return it as Well Known Text (WKT) unsigned char array. More... | |
unsigned char * | Vect_read_line_to_wkb (const struct Map_info *Map, struct line_pnts *line_p, struct line_cats *line_c, int line, size_t *size, int *error) |
Read a Well Known Binary (WKB) representation of a given feature id. More... | |
unsigned char * | Vect_line_to_wkb (const struct line_pnts *points, int type, int with_z, size_t *size) |
Create a Well Known Binary (WKB) representation of given feature type from points. More... | |
char * | Vect_line_to_wkt (const struct line_pnts *points, int type, int with_z) |
Create a Well Known Text (WKT) representation of given feature type from points. More... | |
Vector library - GEOS powered WKT and WKB export.
Higher level functions for reading/writing/manipulating vectors.
(C) 2015 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file geos_to_wktb.c.
unsigned char* Vect_line_to_wkb | ( | const struct line_pnts * | points, |
int | type, | ||
int | with_z, | ||
size_t * | size | ||
) |
Create a Well Known Binary (WKB) representation of given feature type from points.
This function is not thread safe, it uses static variables for speedup.
Supported feature types:
points | pointer to line_pnts structure |
type | feature type (see supported types) |
with_z | Set to 1 if the feature is 3d, 0 otherwise |
size | The size of the returned byte array |
Definition at line 201 of file geos_to_wktb.c.
char* Vect_line_to_wkt | ( | const struct line_pnts * | points, |
int | type, | ||
int | with_z | ||
) |
Create a Well Known Text (WKT) representation of given feature type from points.
This function is not thread safe, it uses static variables for speedup.
Supported types:
points | pointer to line_pnts structure |
type | feature type (see supported types) |
with_z | Set to 1 if the feature is 3d, 0 otherwise |
Definition at line 249 of file geos_to_wktb.c.
unsigned char* Vect_read_area_to_wkb | ( | struct Map_info * | Map, |
int | area, | ||
size_t * | size | ||
) |
Read vector area and return it as Well Known Binary (WKB) unsigned char array.
Map | pointer to Map_info structure |
area | area id |
size | The size of the returned unsigned char array |
Definition at line 33 of file geos_to_wktb.c.
References init(), NULL, and Vect_read_area_geos().
char* Vect_read_area_to_wkt | ( | struct Map_info * | Map, |
int | area | ||
) |
Read vector area and return it as Well Known Text (WKT) unsigned char array.
Map | pointer to Map_info structure |
area | area id |
size | The size of the returned unsigned char array |
Definition at line 72 of file geos_to_wktb.c.
References init(), NULL, and Vect_read_area_geos().
unsigned char* Vect_read_line_to_wkb | ( | const struct Map_info * | Map, |
struct line_pnts * | line_p, | ||
struct line_cats * | line_c, | ||
int | line, | ||
size_t * | size, | ||
int * | error | ||
) |
Read a Well Known Binary (WKB) representation of a given feature id.
This function reads a specific feature and converts it into a WKB representation. line_pnts and line_cats structures can be provided to store the result of the read operation. That is meaningful in case the category values of the feature are needed. This function is not thread safe, it uses static variables for speedup.
Supported feature types:
Map | pointer to Map_info structure |
line_p | pointer to line_pnts structure to use, or NULL |
line_c | pointer to line_cats structure to use, or NULL |
line | The id of the feature to read |
size | The size of the returned unsigned char array |
Definition at line 125 of file geos_to_wktb.c.