PostGIS  2.2.7dev-r@@SVN_REVISION@@
Go to the documentation of this file.
1 #include "liblwgeom_internal.h"
3 /*
4 * Coordinate object to hold information about last coordinate temporarily.
5 * We need to know how many dimensions there are at any given time.
6 */
7 typedef struct
8 {
9  uint8_t flags;
10  double x;
11  double y;
12  double z;
13  double m;
14 }
17 /*
18 * Global that holds the final output geometry for the WKT parser.
19 */
21 extern const char *parser_error_messages[];
23 /*
24 * Prototypes for the lexer
25 */
26 extern void wkt_lexer_init(char *str);
27 extern void wkt_lexer_close(void);
28 extern int wkt_yylex_destroy(void);
31 /*
32 * Functions called from within the bison parser to construct geometries.
33 */
34 int wkt_lexer_read_srid(char *str);
35 POINT wkt_parser_coord_2(double c1, double c2);
36 POINT wkt_parser_coord_3(double c1, double c2, double c3);
37 POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4);
40 LWGEOM* wkt_parser_point_new(POINTARRAY *pa, char *dimensionality);
41 LWGEOM* wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality);
42 LWGEOM* wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality);
43 LWGEOM* wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality);
44 LWGEOM* wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck);
45 LWGEOM* wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck);
46 LWGEOM* wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality);
49 LWGEOM* wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality);
54 LWGEOM* wkt_parser_collection_finalize(int lwtype, LWGEOM *col, char *dimensionality);
55 void wkt_parser_geometry_new(LWGEOM *geom, int srid);
double x
Definition: lwin_wkt.h:10
LWGEOM * wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:521
LWGEOM * wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality)
Definition: lwin_wkt.c:410
double m
Definition: lwin_wkt.h:13
LWGEOM * wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:777
LWGEOM * wkt_parser_point_new(POINTARRAY *pa, char *dimensionality)
Create a new point.
Definition: lwin_wkt.c:306
int wkt_yylex_destroy(void)
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:471
LWGEOM * wkt_parser_curvepolygon_new(LWGEOM *ring)
Definition: lwin_wkt.c:553
int wkt_lexer_read_srid(char *str)
Read the SRID number from an SRID=<> string.
Definition: lwin_wkt.c:47
LWGEOM * wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality)
Create a new circularstring.
Definition: lwin_wkt.c:374
LWGEOM * wkt_parser_collection_new(LWGEOM *geom)
Definition: lwin_wkt.c:684
LWGEOM_PARSER_RESULT global_parser_result
double y
Definition: lwin_wkt.h:11
LWGEOM * wkt_parser_collection_finalize(int lwtype, LWGEOM *col, char *dimensionality)
Definition: lwin_wkt.c:791
LWGEOM * wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality)
Create a new linestring.
Definition: lwin_wkt.c:340
void wkt_lexer_init(char *str)
LWGEOM * wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:652
POINTARRAY * wkt_parser_ptarray_new(POINT p)
Start a point array from the first coordinate.
Definition: lwin_wkt.c:289
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition: lwin_wkt.c:251
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM...
Definition: liblwgeom.h:1876
double z
Definition: lwin_wkt.h:12
void wkt_lexer_close(void)
Definition: lwin_wkt.h:7
POINT wkt_parser_coord_2(double c1, double c2)
Build a 2d coordinate.
Definition: lwin_wkt.c:207
LWGEOM * wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:745
LWGEOM * wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:446
const char * parser_error_messages[]
Definition: lwin_wkt.c:23
POINT wkt_parser_coord_3(double c1, double c2, double c3)
Note, if this is an XYM coordinate we&#39;ll have to fix it later when we build the object itself and hav...
Definition: lwin_wkt.c:223
LWGEOM * wkt_parser_compound_new(LWGEOM *element)
Definition: lwin_wkt.c:710
void wkt_parser_geometry_new(LWGEOM *geom, int srid)
Definition: lwin_wkt.c:845
LWGEOM * wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring)
Definition: lwin_wkt.c:571
uint8_t flags
Definition: lwin_wkt.h:9
POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4)
Definition: lwin_wkt.c:238