[postgis-tickets] r17918 - Address leaks detected by OSS-FUZZ
Raul
raul at rmr.ninja
Tue Oct 15 05:08:45 PDT 2019
Author: algunenano
Date: 2019-10-15 05:08:44 -0700 (Tue, 15 Oct 2019)
New Revision: 17918
Modified:
trunk/NEWS
trunk/liblwgeom/cunit/cu_in_wkb.c
trunk/liblwgeom/cunit/cu_in_wkt.c
trunk/liblwgeom/lwin_wkb.c
trunk/liblwgeom/lwin_wkt_parse.c
trunk/liblwgeom/lwin_wkt_parse.y
Log:
Address leaks detected by OSS-FUZZ
Closes #4544
Closes #4545
Closes https://github.com/postgis/postgis/pull/496
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/NEWS 2019-10-15 12:08:44 UTC (rev 17918)
@@ -1,3 +1,16 @@
+PostGIS 3.1.0
+2020/XX/XX
+
+* Breaking changes *
+ -
+
+* New features *
+ -
+
+* Bug fixes *
+ - #4544, Fix leak when parsing a WKT geometry_list (Raúl Marín)
+ - #4545, Fix leak in wkt_parser_triangle_new (Raúl Marín)
+
PostGIS 3.0.0rc2
2019/10/13
Modified: trunk/liblwgeom/cunit/cu_in_wkb.c
===================================================================
--- trunk/liblwgeom/cunit/cu_in_wkb.c 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/liblwgeom/cunit/cu_in_wkb.c 2019-10-15 12:08:44 UTC (rev 17918)
@@ -261,6 +261,12 @@
uint8_t wkb3[9] = {0x01, 0x03, 0x00, 0x00, 0x10, 0x8d, 0x55, 0xf3, 0xff};
g = lwgeom_from_wkb(wkb3, 9, LW_PARSER_CHECK_NONE);
lwgeom_free(g);
+
+ /* OSS-FUZZ: https://trac.osgeo.org/postgis/ticket/4544 */
+ uint8_t wkb4[22] = {0x01, 0x0f, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x11, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00};
+ g = lwgeom_from_wkb(wkb4, 22, LW_PARSER_CHECK_NONE);
+ lwgeom_free(g);
}
/*
Modified: trunk/liblwgeom/cunit/cu_in_wkt.c
===================================================================
--- trunk/liblwgeom/cunit/cu_in_wkt.c 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/liblwgeom/cunit/cu_in_wkt.c 2019-10-15 12:08:44 UTC (rev 17918)
@@ -394,10 +394,17 @@
static void test_wkt_leak(void)
{
+ /* OSS-FUZZ: https://trac.osgeo.org/postgis/ticket/4537 */
char *wkt = "TINEMPTY,";
char *err = cu_wkt_in(wkt, WKT_EXTENDED);
CU_ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
lwfree(err);
+
+ /* OSS-FUZZ: https://trac.osgeo.org/postgis/ticket/4545 */
+ wkt = "GEOMeTRYCOLLECTION(POLYHEDRALSURFACEEMPTY ";
+ err = cu_wkt_in(wkt, WKT_EXTENDED);
+ CU_ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
+ lwfree(err);
}
/*
Modified: trunk/liblwgeom/lwin_wkb.c
===================================================================
--- trunk/liblwgeom/lwin_wkb.c 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/liblwgeom/lwin_wkb.c 2019-10-15 12:08:44 UTC (rev 17918)
@@ -589,44 +589,41 @@
uint32_t nrings = integer_from_wkb_state(s);
if (s->error)
return NULL;
- LWTRIANGLE *tri = lwtriangle_construct_empty(s->srid, s->has_z, s->has_m);
- POINTARRAY *pa = NULL;
/* Empty triangle? */
if( nrings == 0 )
- return tri;
+ return lwtriangle_construct_empty(s->srid, s->has_z, s->has_m);
/* Should be only one ring. */
- if ( nrings != 1 )
+ if (nrings != 1)
+ {
lwerror("Triangle has wrong number of rings: %d", nrings);
+ }
/* There's only one ring, we hope? */
- pa = ptarray_from_wkb_state(s);
+ POINTARRAY *pa = ptarray_from_wkb_state(s);
/* If there's no points, return an empty triangle. */
- if( pa == NULL )
- return tri;
+ if (pa == NULL)
+ return lwtriangle_construct_empty(s->srid, s->has_z, s->has_m);
/* Check for at least four points. */
- if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 4 )
+ if (s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 4)
{
- LWDEBUGF(2, "%s must have at least four points", lwtype_name(s->lwtype));
+ ptarray_free(pa);
lwerror("%s must have at least four points", lwtype_name(s->lwtype));
return NULL;
}
- if( s->check & LW_PARSER_CHECK_ZCLOSURE && ! ptarray_is_closed_z(pa) )
+ if (s->check & LW_PARSER_CHECK_ZCLOSURE && !ptarray_is_closed_z(pa))
{
+ ptarray_free(pa);
lwerror("%s must have closed rings", lwtype_name(s->lwtype));
return NULL;
}
/* Empty TRIANGLE starts w/ empty POINTARRAY, free it first */
- if (tri->points)
- ptarray_free(tri->points);
-
- tri->points = pa;
- return tri;
+ return lwtriangle_construct(s->srid, NULL, pa);
}
/**
Modified: trunk/liblwgeom/lwin_wkt_parse.c
===================================================================
--- trunk/liblwgeom/lwin_wkt_parse.c 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/liblwgeom/lwin_wkt_parse.c 2019-10-15 12:08:44 UTC (rev 17918)
@@ -609,20 +609,20 @@
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 216, 216, 218, 222, 223, 224, 225, 226, 227,
- 228, 229, 230, 231, 232, 233, 234, 235, 236, 239,
- 241, 243, 245, 249, 251, 255, 257, 259, 261, 265,
- 267, 269, 271, 273, 275, 279, 281, 283, 285, 289,
- 291, 293, 295, 299, 301, 303, 305, 309, 311, 315,
- 317, 321, 323, 325, 327, 331, 333, 337, 340, 342,
- 344, 346, 350, 352, 356, 357, 358, 359, 362, 364,
- 368, 370, 374, 377, 380, 382, 384, 386, 390, 392,
- 394, 396, 398, 400, 404, 406, 408, 410, 414, 416,
- 418, 420, 422, 424, 426, 428, 432, 434, 436, 438,
- 442, 444, 448, 450, 452, 454, 458, 460, 462, 464,
- 468, 470, 474, 476, 480, 482, 484, 486, 490, 494,
- 496, 498, 500, 504, 506, 510, 512, 514, 518, 520,
- 522, 524, 528, 530, 534, 536, 538
+ 0, 217, 217, 219, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 240,
+ 242, 244, 246, 250, 252, 256, 258, 260, 262, 266,
+ 268, 270, 272, 274, 276, 280, 282, 284, 286, 290,
+ 292, 294, 296, 300, 302, 304, 306, 310, 312, 316,
+ 318, 322, 324, 326, 328, 332, 334, 338, 341, 343,
+ 345, 347, 351, 353, 357, 358, 359, 360, 363, 365,
+ 369, 371, 375, 378, 381, 383, 385, 387, 391, 393,
+ 395, 397, 399, 401, 405, 407, 409, 411, 415, 417,
+ 419, 421, 423, 425, 427, 429, 433, 435, 437, 439,
+ 443, 445, 449, 451, 453, 455, 459, 461, 463, 465,
+ 469, 471, 475, 477, 481, 483, 485, 487, 491, 495,
+ 497, 499, 501, 505, 507, 511, 513, 515, 519, 521,
+ 523, 525, 529, 531, 535, 537, 539
};
#endif
@@ -1404,208 +1404,214 @@
#line 1405 "lwin_wkt_parse.c"
break;
- case 31: /* multisurface */
-#line 202 "lwin_wkt_parse.y"
+ case 30: /* geometry_list */
+#line 196 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
#line 1411 "lwin_wkt_parse.c"
break;
+ case 31: /* multisurface */
+#line 203 "lwin_wkt_parse.y"
+ { lwgeom_free(((*yyvaluep).geometryvalue)); }
+#line 1417 "lwin_wkt_parse.c"
+ break;
+
case 32: /* surface_list */
#line 181 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1417 "lwin_wkt_parse.c"
+#line 1423 "lwin_wkt_parse.c"
break;
case 33: /* tin */
-#line 209 "lwin_wkt_parse.y"
+#line 210 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1423 "lwin_wkt_parse.c"
+#line 1429 "lwin_wkt_parse.c"
break;
case 34: /* polyhedralsurface */
-#line 208 "lwin_wkt_parse.y"
+#line 209 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1429 "lwin_wkt_parse.c"
+#line 1435 "lwin_wkt_parse.c"
break;
case 35: /* multipolygon */
-#line 201 "lwin_wkt_parse.y"
+#line 202 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1435 "lwin_wkt_parse.c"
+#line 1441 "lwin_wkt_parse.c"
break;
case 36: /* polygon_list */
#line 182 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1441 "lwin_wkt_parse.c"
+#line 1447 "lwin_wkt_parse.c"
break;
case 37: /* patch_list */
#line 183 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1447 "lwin_wkt_parse.c"
+#line 1453 "lwin_wkt_parse.c"
break;
case 38: /* polygon */
-#line 205 "lwin_wkt_parse.y"
+#line 206 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1453 "lwin_wkt_parse.c"
+#line 1459 "lwin_wkt_parse.c"
break;
case 39: /* polygon_untagged */
-#line 207 "lwin_wkt_parse.y"
+#line 208 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1459 "lwin_wkt_parse.c"
+#line 1465 "lwin_wkt_parse.c"
break;
case 40: /* patch */
-#line 206 "lwin_wkt_parse.y"
+#line 207 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1465 "lwin_wkt_parse.c"
+#line 1471 "lwin_wkt_parse.c"
break;
case 41: /* curvepolygon */
#line 192 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1471 "lwin_wkt_parse.c"
+#line 1477 "lwin_wkt_parse.c"
break;
case 42: /* curvering_list */
#line 179 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1477 "lwin_wkt_parse.c"
+#line 1483 "lwin_wkt_parse.c"
break;
case 43: /* curvering */
#line 193 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1483 "lwin_wkt_parse.c"
+#line 1489 "lwin_wkt_parse.c"
break;
case 44: /* patchring_list */
#line 189 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1489 "lwin_wkt_parse.c"
+#line 1495 "lwin_wkt_parse.c"
break;
case 45: /* ring_list */
#line 188 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1495 "lwin_wkt_parse.c"
+#line 1501 "lwin_wkt_parse.c"
break;
case 46: /* patchring */
#line 178 "lwin_wkt_parse.y"
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1501 "lwin_wkt_parse.c"
+#line 1507 "lwin_wkt_parse.c"
break;
case 47: /* ring */
#line 177 "lwin_wkt_parse.y"
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1507 "lwin_wkt_parse.c"
+#line 1513 "lwin_wkt_parse.c"
break;
case 48: /* compoundcurve */
#line 191 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1513 "lwin_wkt_parse.c"
+#line 1519 "lwin_wkt_parse.c"
break;
case 49: /* compound_list */
#line 187 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1519 "lwin_wkt_parse.c"
+#line 1525 "lwin_wkt_parse.c"
break;
case 50: /* multicurve */
-#line 198 "lwin_wkt_parse.y"
+#line 199 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1525 "lwin_wkt_parse.c"
+#line 1531 "lwin_wkt_parse.c"
break;
case 51: /* curve_list */
#line 186 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1531 "lwin_wkt_parse.c"
+#line 1537 "lwin_wkt_parse.c"
break;
case 52: /* multilinestring */
-#line 199 "lwin_wkt_parse.y"
+#line 200 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1537 "lwin_wkt_parse.c"
+#line 1543 "lwin_wkt_parse.c"
break;
case 53: /* linestring_list */
#line 185 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1543 "lwin_wkt_parse.c"
+#line 1549 "lwin_wkt_parse.c"
break;
case 54: /* circularstring */
#line 190 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1549 "lwin_wkt_parse.c"
+#line 1555 "lwin_wkt_parse.c"
break;
case 55: /* linestring */
-#line 196 "lwin_wkt_parse.y"
+#line 197 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1555 "lwin_wkt_parse.c"
+#line 1561 "lwin_wkt_parse.c"
break;
case 56: /* linestring_untagged */
-#line 197 "lwin_wkt_parse.y"
+#line 198 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1561 "lwin_wkt_parse.c"
+#line 1567 "lwin_wkt_parse.c"
break;
case 57: /* triangle_list */
#line 180 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1567 "lwin_wkt_parse.c"
+#line 1573 "lwin_wkt_parse.c"
break;
case 58: /* triangle */
-#line 210 "lwin_wkt_parse.y"
+#line 211 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1573 "lwin_wkt_parse.c"
+#line 1579 "lwin_wkt_parse.c"
break;
case 59: /* triangle_untagged */
-#line 211 "lwin_wkt_parse.y"
+#line 212 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1579 "lwin_wkt_parse.c"
+#line 1585 "lwin_wkt_parse.c"
break;
case 60: /* multipoint */
-#line 200 "lwin_wkt_parse.y"
+#line 201 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1585 "lwin_wkt_parse.c"
+#line 1591 "lwin_wkt_parse.c"
break;
case 61: /* point_list */
#line 184 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1591 "lwin_wkt_parse.c"
+#line 1597 "lwin_wkt_parse.c"
break;
case 62: /* point_untagged */
-#line 204 "lwin_wkt_parse.y"
+#line 205 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1597 "lwin_wkt_parse.c"
+#line 1603 "lwin_wkt_parse.c"
break;
case 63: /* point */
-#line 203 "lwin_wkt_parse.y"
+#line 204 "lwin_wkt_parse.y"
{ lwgeom_free(((*yyvaluep).geometryvalue)); }
-#line 1603 "lwin_wkt_parse.c"
+#line 1609 "lwin_wkt_parse.c"
break;
case 64: /* ptarray */
#line 176 "lwin_wkt_parse.y"
{ ptarray_free(((*yyvaluep).ptarrayvalue)); }
-#line 1609 "lwin_wkt_parse.c"
+#line 1615 "lwin_wkt_parse.c"
break;
default:
@@ -1895,817 +1901,817 @@
switch (yyn)
{
case 2:
-#line 217 "lwin_wkt_parse.y"
+#line 218 "lwin_wkt_parse.y"
{ wkt_parser_geometry_new((yyvsp[0].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
-#line 1901 "lwin_wkt_parse.c"
+#line 1907 "lwin_wkt_parse.c"
break;
case 3:
-#line 219 "lwin_wkt_parse.y"
+#line 220 "lwin_wkt_parse.y"
{ wkt_parser_geometry_new((yyvsp[0].geometryvalue), (yyvsp[-2].integervalue)); WKT_ERROR(); }
-#line 1907 "lwin_wkt_parse.c"
+#line 1913 "lwin_wkt_parse.c"
break;
case 4:
-#line 222 "lwin_wkt_parse.y"
- { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 1913 "lwin_wkt_parse.c"
- break;
-
- case 5:
#line 223 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1919 "lwin_wkt_parse.c"
break;
- case 6:
+ case 5:
#line 224 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1925 "lwin_wkt_parse.c"
break;
- case 7:
+ case 6:
#line 225 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1931 "lwin_wkt_parse.c"
break;
- case 8:
+ case 7:
#line 226 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1937 "lwin_wkt_parse.c"
break;
- case 9:
+ case 8:
#line 227 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1943 "lwin_wkt_parse.c"
break;
- case 10:
+ case 9:
#line 228 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1949 "lwin_wkt_parse.c"
break;
- case 11:
+ case 10:
#line 229 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1955 "lwin_wkt_parse.c"
break;
- case 12:
+ case 11:
#line 230 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1961 "lwin_wkt_parse.c"
break;
- case 13:
+ case 12:
#line 231 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1967 "lwin_wkt_parse.c"
break;
- case 14:
+ case 13:
#line 232 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1973 "lwin_wkt_parse.c"
break;
- case 15:
+ case 14:
#line 233 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1979 "lwin_wkt_parse.c"
break;
- case 16:
+ case 15:
#line 234 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1985 "lwin_wkt_parse.c"
break;
- case 17:
+ case 16:
#line 235 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1991 "lwin_wkt_parse.c"
break;
- case 18:
+ case 17:
#line 236 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 1997 "lwin_wkt_parse.c"
break;
+ case 18:
+#line 237 "lwin_wkt_parse.y"
+ { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
+#line 2003 "lwin_wkt_parse.c"
+ break;
+
case 19:
-#line 240 "lwin_wkt_parse.y"
+#line 241 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2003 "lwin_wkt_parse.c"
+#line 2009 "lwin_wkt_parse.c"
break;
case 20:
-#line 242 "lwin_wkt_parse.y"
+#line 243 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2009 "lwin_wkt_parse.c"
+#line 2015 "lwin_wkt_parse.c"
break;
case 21:
-#line 244 "lwin_wkt_parse.y"
+#line 245 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2015 "lwin_wkt_parse.c"
+#line 2021 "lwin_wkt_parse.c"
break;
case 22:
-#line 246 "lwin_wkt_parse.y"
+#line 247 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2021 "lwin_wkt_parse.c"
+#line 2027 "lwin_wkt_parse.c"
break;
case 23:
-#line 250 "lwin_wkt_parse.y"
+#line 251 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2027 "lwin_wkt_parse.c"
+#line 2033 "lwin_wkt_parse.c"
break;
case 24:
-#line 252 "lwin_wkt_parse.y"
+#line 253 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2033 "lwin_wkt_parse.c"
+#line 2039 "lwin_wkt_parse.c"
break;
case 25:
-#line 256 "lwin_wkt_parse.y"
+#line 257 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2039 "lwin_wkt_parse.c"
+#line 2045 "lwin_wkt_parse.c"
break;
case 26:
-#line 258 "lwin_wkt_parse.y"
+#line 259 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2045 "lwin_wkt_parse.c"
+#line 2051 "lwin_wkt_parse.c"
break;
case 27:
-#line 260 "lwin_wkt_parse.y"
+#line 261 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2051 "lwin_wkt_parse.c"
+#line 2057 "lwin_wkt_parse.c"
break;
case 28:
-#line 262 "lwin_wkt_parse.y"
+#line 263 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2057 "lwin_wkt_parse.c"
+#line 2063 "lwin_wkt_parse.c"
break;
case 29:
-#line 266 "lwin_wkt_parse.y"
+#line 267 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2063 "lwin_wkt_parse.c"
+#line 2069 "lwin_wkt_parse.c"
break;
case 30:
-#line 268 "lwin_wkt_parse.y"
+#line 269 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2069 "lwin_wkt_parse.c"
+#line 2075 "lwin_wkt_parse.c"
break;
case 31:
-#line 270 "lwin_wkt_parse.y"
+#line 271 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2075 "lwin_wkt_parse.c"
+#line 2081 "lwin_wkt_parse.c"
break;
case 32:
-#line 272 "lwin_wkt_parse.y"
+#line 273 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2081 "lwin_wkt_parse.c"
+#line 2087 "lwin_wkt_parse.c"
break;
case 33:
-#line 274 "lwin_wkt_parse.y"
+#line 275 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2087 "lwin_wkt_parse.c"
+#line 2093 "lwin_wkt_parse.c"
break;
case 34:
-#line 276 "lwin_wkt_parse.y"
+#line 277 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2093 "lwin_wkt_parse.c"
+#line 2099 "lwin_wkt_parse.c"
break;
case 35:
-#line 280 "lwin_wkt_parse.y"
+#line 281 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2099 "lwin_wkt_parse.c"
+#line 2105 "lwin_wkt_parse.c"
break;
case 36:
-#line 282 "lwin_wkt_parse.y"
+#line 283 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2105 "lwin_wkt_parse.c"
+#line 2111 "lwin_wkt_parse.c"
break;
case 37:
-#line 284 "lwin_wkt_parse.y"
+#line 285 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2111 "lwin_wkt_parse.c"
+#line 2117 "lwin_wkt_parse.c"
break;
case 38:
-#line 286 "lwin_wkt_parse.y"
+#line 287 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2117 "lwin_wkt_parse.c"
+#line 2123 "lwin_wkt_parse.c"
break;
case 39:
-#line 290 "lwin_wkt_parse.y"
+#line 291 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2123 "lwin_wkt_parse.c"
+#line 2129 "lwin_wkt_parse.c"
break;
case 40:
-#line 292 "lwin_wkt_parse.y"
+#line 293 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2129 "lwin_wkt_parse.c"
+#line 2135 "lwin_wkt_parse.c"
break;
case 41:
-#line 294 "lwin_wkt_parse.y"
+#line 295 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2135 "lwin_wkt_parse.c"
+#line 2141 "lwin_wkt_parse.c"
break;
case 42:
-#line 296 "lwin_wkt_parse.y"
+#line 297 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2141 "lwin_wkt_parse.c"
+#line 2147 "lwin_wkt_parse.c"
break;
case 43:
-#line 300 "lwin_wkt_parse.y"
+#line 301 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2147 "lwin_wkt_parse.c"
+#line 2153 "lwin_wkt_parse.c"
break;
case 44:
-#line 302 "lwin_wkt_parse.y"
+#line 303 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2153 "lwin_wkt_parse.c"
+#line 2159 "lwin_wkt_parse.c"
break;
case 45:
-#line 304 "lwin_wkt_parse.y"
+#line 305 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2159 "lwin_wkt_parse.c"
+#line 2165 "lwin_wkt_parse.c"
break;
case 46:
-#line 306 "lwin_wkt_parse.y"
+#line 307 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2165 "lwin_wkt_parse.c"
+#line 2171 "lwin_wkt_parse.c"
break;
case 47:
-#line 310 "lwin_wkt_parse.y"
+#line 311 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2171 "lwin_wkt_parse.c"
+#line 2177 "lwin_wkt_parse.c"
break;
case 48:
-#line 312 "lwin_wkt_parse.y"
+#line 313 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2177 "lwin_wkt_parse.c"
+#line 2183 "lwin_wkt_parse.c"
break;
case 49:
-#line 316 "lwin_wkt_parse.y"
+#line 317 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2183 "lwin_wkt_parse.c"
+#line 2189 "lwin_wkt_parse.c"
break;
case 50:
-#line 318 "lwin_wkt_parse.y"
+#line 319 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2189 "lwin_wkt_parse.c"
+#line 2195 "lwin_wkt_parse.c"
break;
case 51:
-#line 322 "lwin_wkt_parse.y"
+#line 323 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2195 "lwin_wkt_parse.c"
+#line 2201 "lwin_wkt_parse.c"
break;
case 52:
-#line 324 "lwin_wkt_parse.y"
+#line 325 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2201 "lwin_wkt_parse.c"
+#line 2207 "lwin_wkt_parse.c"
break;
case 53:
-#line 326 "lwin_wkt_parse.y"
+#line 327 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2207 "lwin_wkt_parse.c"
+#line 2213 "lwin_wkt_parse.c"
break;
case 54:
-#line 328 "lwin_wkt_parse.y"
+#line 329 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2213 "lwin_wkt_parse.c"
+#line 2219 "lwin_wkt_parse.c"
break;
case 55:
-#line 332 "lwin_wkt_parse.y"
+#line 333 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
-#line 2219 "lwin_wkt_parse.c"
+#line 2225 "lwin_wkt_parse.c"
break;
case 56:
-#line 334 "lwin_wkt_parse.y"
+#line 335 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2225 "lwin_wkt_parse.c"
+#line 2231 "lwin_wkt_parse.c"
break;
case 57:
-#line 337 "lwin_wkt_parse.y"
+#line 338 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
-#line 2231 "lwin_wkt_parse.c"
+#line 2237 "lwin_wkt_parse.c"
break;
case 58:
-#line 341 "lwin_wkt_parse.y"
+#line 342 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2237 "lwin_wkt_parse.c"
+#line 2243 "lwin_wkt_parse.c"
break;
case 59:
-#line 343 "lwin_wkt_parse.y"
+#line 344 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2243 "lwin_wkt_parse.c"
+#line 2249 "lwin_wkt_parse.c"
break;
case 60:
-#line 345 "lwin_wkt_parse.y"
+#line 346 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2249 "lwin_wkt_parse.c"
+#line 2255 "lwin_wkt_parse.c"
break;
case 61:
-#line 347 "lwin_wkt_parse.y"
+#line 348 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
-#line 2255 "lwin_wkt_parse.c"
+#line 2261 "lwin_wkt_parse.c"
break;
case 62:
-#line 351 "lwin_wkt_parse.y"
+#line 352 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2261 "lwin_wkt_parse.c"
+#line 2267 "lwin_wkt_parse.c"
break;
case 63:
-#line 353 "lwin_wkt_parse.y"
+#line 354 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2267 "lwin_wkt_parse.c"
+#line 2273 "lwin_wkt_parse.c"
break;
case 64:
-#line 356 "lwin_wkt_parse.y"
- { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
-#line 2273 "lwin_wkt_parse.c"
- break;
-
- case 65:
#line 357 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 2279 "lwin_wkt_parse.c"
break;
- case 66:
+ case 65:
#line 358 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 2285 "lwin_wkt_parse.c"
break;
- case 67:
+ case 66:
#line 359 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
#line 2291 "lwin_wkt_parse.c"
break;
+ case 67:
+#line 360 "lwin_wkt_parse.y"
+ { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
+#line 2297 "lwin_wkt_parse.c"
+ break;
+
case 68:
-#line 363 "lwin_wkt_parse.y"
+#line 364 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
-#line 2297 "lwin_wkt_parse.c"
+#line 2303 "lwin_wkt_parse.c"
break;
case 69:
-#line 365 "lwin_wkt_parse.y"
+#line 366 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
-#line 2303 "lwin_wkt_parse.c"
+#line 2309 "lwin_wkt_parse.c"
break;
case 70:
-#line 369 "lwin_wkt_parse.y"
+#line 370 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
-#line 2309 "lwin_wkt_parse.c"
+#line 2315 "lwin_wkt_parse.c"
break;
case 71:
-#line 371 "lwin_wkt_parse.y"
+#line 372 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
-#line 2315 "lwin_wkt_parse.c"
+#line 2321 "lwin_wkt_parse.c"
break;
case 72:
-#line 374 "lwin_wkt_parse.y"
+#line 375 "lwin_wkt_parse.y"
{ (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
-#line 2321 "lwin_wkt_parse.c"
+#line 2327 "lwin_wkt_parse.c"
break;
case 73:
-#line 377 "lwin_wkt_parse.y"
+#line 378 "lwin_wkt_parse.y"
{ (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
-#line 2327 "lwin_wkt_parse.c"
+#line 2333 "lwin_wkt_parse.c"
break;
case 74:
-#line 381 "lwin_wkt_parse.y"
+#line 382 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2333 "lwin_wkt_parse.c"
+#line 2339 "lwin_wkt_parse.c"
break;
case 75:
-#line 383 "lwin_wkt_parse.y"
+#line 384 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2339 "lwin_wkt_parse.c"
+#line 2345 "lwin_wkt_parse.c"
break;
case 76:
-#line 385 "lwin_wkt_parse.y"
+#line 386 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2345 "lwin_wkt_parse.c"
+#line 2351 "lwin_wkt_parse.c"
break;
case 77:
-#line 387 "lwin_wkt_parse.y"
+#line 388 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2351 "lwin_wkt_parse.c"
+#line 2357 "lwin_wkt_parse.c"
break;
case 78:
-#line 391 "lwin_wkt_parse.y"
+#line 392 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2357 "lwin_wkt_parse.c"
+#line 2363 "lwin_wkt_parse.c"
break;
case 79:
-#line 393 "lwin_wkt_parse.y"
+#line 394 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2363 "lwin_wkt_parse.c"
+#line 2369 "lwin_wkt_parse.c"
break;
case 80:
-#line 395 "lwin_wkt_parse.y"
+#line 396 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2369 "lwin_wkt_parse.c"
+#line 2375 "lwin_wkt_parse.c"
break;
case 81:
-#line 397 "lwin_wkt_parse.y"
+#line 398 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2375 "lwin_wkt_parse.c"
+#line 2381 "lwin_wkt_parse.c"
break;
case 82:
-#line 399 "lwin_wkt_parse.y"
+#line 400 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2381 "lwin_wkt_parse.c"
+#line 2387 "lwin_wkt_parse.c"
break;
case 83:
-#line 401 "lwin_wkt_parse.y"
+#line 402 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2387 "lwin_wkt_parse.c"
+#line 2393 "lwin_wkt_parse.c"
break;
case 84:
-#line 405 "lwin_wkt_parse.y"
+#line 406 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2393 "lwin_wkt_parse.c"
+#line 2399 "lwin_wkt_parse.c"
break;
case 85:
-#line 407 "lwin_wkt_parse.y"
+#line 408 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2399 "lwin_wkt_parse.c"
+#line 2405 "lwin_wkt_parse.c"
break;
case 86:
-#line 409 "lwin_wkt_parse.y"
+#line 410 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2405 "lwin_wkt_parse.c"
+#line 2411 "lwin_wkt_parse.c"
break;
case 87:
-#line 411 "lwin_wkt_parse.y"
+#line 412 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2411 "lwin_wkt_parse.c"
+#line 2417 "lwin_wkt_parse.c"
break;
case 88:
-#line 415 "lwin_wkt_parse.y"
+#line 416 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2417 "lwin_wkt_parse.c"
+#line 2423 "lwin_wkt_parse.c"
break;
case 89:
-#line 417 "lwin_wkt_parse.y"
+#line 418 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2423 "lwin_wkt_parse.c"
+#line 2429 "lwin_wkt_parse.c"
break;
case 90:
-#line 419 "lwin_wkt_parse.y"
+#line 420 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2429 "lwin_wkt_parse.c"
+#line 2435 "lwin_wkt_parse.c"
break;
case 91:
-#line 421 "lwin_wkt_parse.y"
+#line 422 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2435 "lwin_wkt_parse.c"
+#line 2441 "lwin_wkt_parse.c"
break;
case 92:
-#line 423 "lwin_wkt_parse.y"
+#line 424 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2441 "lwin_wkt_parse.c"
+#line 2447 "lwin_wkt_parse.c"
break;
case 93:
-#line 425 "lwin_wkt_parse.y"
+#line 426 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2447 "lwin_wkt_parse.c"
+#line 2453 "lwin_wkt_parse.c"
break;
case 94:
-#line 427 "lwin_wkt_parse.y"
+#line 428 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2453 "lwin_wkt_parse.c"
+#line 2459 "lwin_wkt_parse.c"
break;
case 95:
-#line 429 "lwin_wkt_parse.y"
+#line 430 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2459 "lwin_wkt_parse.c"
+#line 2465 "lwin_wkt_parse.c"
break;
case 96:
-#line 433 "lwin_wkt_parse.y"
+#line 434 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2465 "lwin_wkt_parse.c"
+#line 2471 "lwin_wkt_parse.c"
break;
case 97:
-#line 435 "lwin_wkt_parse.y"
+#line 436 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2471 "lwin_wkt_parse.c"
+#line 2477 "lwin_wkt_parse.c"
break;
case 98:
-#line 437 "lwin_wkt_parse.y"
+#line 438 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2477 "lwin_wkt_parse.c"
+#line 2483 "lwin_wkt_parse.c"
break;
case 99:
-#line 439 "lwin_wkt_parse.y"
+#line 440 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL); WKT_ERROR(); }
-#line 2483 "lwin_wkt_parse.c"
+#line 2489 "lwin_wkt_parse.c"
break;
case 100:
-#line 443 "lwin_wkt_parse.y"
+#line 444 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2489 "lwin_wkt_parse.c"
+#line 2495 "lwin_wkt_parse.c"
break;
case 101:
-#line 445 "lwin_wkt_parse.y"
+#line 446 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2495 "lwin_wkt_parse.c"
+#line 2501 "lwin_wkt_parse.c"
break;
case 102:
-#line 449 "lwin_wkt_parse.y"
+#line 450 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2501 "lwin_wkt_parse.c"
+#line 2507 "lwin_wkt_parse.c"
break;
case 103:
-#line 451 "lwin_wkt_parse.y"
+#line 452 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2507 "lwin_wkt_parse.c"
+#line 2513 "lwin_wkt_parse.c"
break;
case 104:
-#line 453 "lwin_wkt_parse.y"
+#line 454 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2513 "lwin_wkt_parse.c"
+#line 2519 "lwin_wkt_parse.c"
break;
case 105:
-#line 455 "lwin_wkt_parse.y"
+#line 456 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
-#line 2519 "lwin_wkt_parse.c"
+#line 2525 "lwin_wkt_parse.c"
break;
case 106:
-#line 459 "lwin_wkt_parse.y"
+#line 460 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2525 "lwin_wkt_parse.c"
+#line 2531 "lwin_wkt_parse.c"
break;
case 107:
-#line 461 "lwin_wkt_parse.y"
+#line 462 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2531 "lwin_wkt_parse.c"
+#line 2537 "lwin_wkt_parse.c"
break;
case 108:
-#line 463 "lwin_wkt_parse.y"
+#line 464 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2537 "lwin_wkt_parse.c"
+#line 2543 "lwin_wkt_parse.c"
break;
case 109:
-#line 465 "lwin_wkt_parse.y"
+#line 466 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
-#line 2543 "lwin_wkt_parse.c"
+#line 2549 "lwin_wkt_parse.c"
break;
case 110:
-#line 469 "lwin_wkt_parse.y"
+#line 470 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2549 "lwin_wkt_parse.c"
+#line 2555 "lwin_wkt_parse.c"
break;
case 111:
-#line 471 "lwin_wkt_parse.y"
+#line 472 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
-#line 2555 "lwin_wkt_parse.c"
+#line 2561 "lwin_wkt_parse.c"
break;
case 112:
-#line 475 "lwin_wkt_parse.y"
+#line 476 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2561 "lwin_wkt_parse.c"
+#line 2567 "lwin_wkt_parse.c"
break;
case 113:
-#line 477 "lwin_wkt_parse.y"
+#line 478 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2567 "lwin_wkt_parse.c"
+#line 2573 "lwin_wkt_parse.c"
break;
case 114:
-#line 481 "lwin_wkt_parse.y"
+#line 482 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2573 "lwin_wkt_parse.c"
+#line 2579 "lwin_wkt_parse.c"
break;
case 115:
-#line 483 "lwin_wkt_parse.y"
+#line 484 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), (yyvsp[-5].stringvalue)); WKT_ERROR(); }
-#line 2579 "lwin_wkt_parse.c"
+#line 2585 "lwin_wkt_parse.c"
break;
case 116:
-#line 485 "lwin_wkt_parse.y"
+#line 486 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2585 "lwin_wkt_parse.c"
+#line 2591 "lwin_wkt_parse.c"
break;
case 117:
-#line 487 "lwin_wkt_parse.y"
+#line 488 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
-#line 2591 "lwin_wkt_parse.c"
+#line 2597 "lwin_wkt_parse.c"
break;
case 118:
-#line 491 "lwin_wkt_parse.y"
+#line 492 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2597 "lwin_wkt_parse.c"
+#line 2603 "lwin_wkt_parse.c"
break;
case 119:
-#line 495 "lwin_wkt_parse.y"
+#line 496 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
-#line 2603 "lwin_wkt_parse.c"
+#line 2609 "lwin_wkt_parse.c"
break;
case 120:
-#line 497 "lwin_wkt_parse.y"
+#line 498 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2609 "lwin_wkt_parse.c"
+#line 2615 "lwin_wkt_parse.c"
break;
case 121:
-#line 499 "lwin_wkt_parse.y"
+#line 500 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2615 "lwin_wkt_parse.c"
+#line 2621 "lwin_wkt_parse.c"
break;
case 122:
-#line 501 "lwin_wkt_parse.y"
+#line 502 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL); WKT_ERROR(); }
-#line 2621 "lwin_wkt_parse.c"
+#line 2627 "lwin_wkt_parse.c"
break;
case 123:
-#line 505 "lwin_wkt_parse.y"
+#line 506 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2627 "lwin_wkt_parse.c"
+#line 2633 "lwin_wkt_parse.c"
break;
case 124:
-#line 507 "lwin_wkt_parse.y"
+#line 508 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
-#line 2633 "lwin_wkt_parse.c"
+#line 2639 "lwin_wkt_parse.c"
break;
case 125:
-#line 511 "lwin_wkt_parse.y"
+#line 512 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)),NULL); WKT_ERROR(); }
-#line 2639 "lwin_wkt_parse.c"
+#line 2645 "lwin_wkt_parse.c"
break;
case 126:
-#line 513 "lwin_wkt_parse.y"
+#line 514 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[-1].coordinatevalue)),NULL); WKT_ERROR(); }
-#line 2645 "lwin_wkt_parse.c"
+#line 2651 "lwin_wkt_parse.c"
break;
case 127:
-#line 515 "lwin_wkt_parse.y"
+#line 516 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
-#line 2651 "lwin_wkt_parse.c"
+#line 2657 "lwin_wkt_parse.c"
break;
case 128:
-#line 519 "lwin_wkt_parse.y"
+#line 520 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
-#line 2657 "lwin_wkt_parse.c"
+#line 2663 "lwin_wkt_parse.c"
break;
case 129:
-#line 521 "lwin_wkt_parse.y"
+#line 522 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
-#line 2663 "lwin_wkt_parse.c"
+#line 2669 "lwin_wkt_parse.c"
break;
case 130:
-#line 523 "lwin_wkt_parse.y"
+#line 524 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
-#line 2669 "lwin_wkt_parse.c"
+#line 2675 "lwin_wkt_parse.c"
break;
case 131:
-#line 525 "lwin_wkt_parse.y"
+#line 526 "lwin_wkt_parse.y"
{ (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
-#line 2675 "lwin_wkt_parse.c"
+#line 2681 "lwin_wkt_parse.c"
break;
case 132:
-#line 529 "lwin_wkt_parse.y"
+#line 530 "lwin_wkt_parse.y"
{ (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue), (yyvsp[0].coordinatevalue)); WKT_ERROR(); }
-#line 2681 "lwin_wkt_parse.c"
+#line 2687 "lwin_wkt_parse.c"
break;
case 133:
-#line 531 "lwin_wkt_parse.y"
+#line 532 "lwin_wkt_parse.y"
{ (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)); WKT_ERROR(); }
-#line 2687 "lwin_wkt_parse.c"
+#line 2693 "lwin_wkt_parse.c"
break;
case 134:
-#line 535 "lwin_wkt_parse.y"
+#line 536 "lwin_wkt_parse.y"
{ (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2693 "lwin_wkt_parse.c"
+#line 2699 "lwin_wkt_parse.c"
break;
case 135:
-#line 537 "lwin_wkt_parse.y"
+#line 538 "lwin_wkt_parse.y"
{ (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2699 "lwin_wkt_parse.c"
+#line 2705 "lwin_wkt_parse.c"
break;
case 136:
-#line 539 "lwin_wkt_parse.y"
+#line 540 "lwin_wkt_parse.y"
{ (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[-3].doublevalue), (yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
-#line 2705 "lwin_wkt_parse.c"
+#line 2711 "lwin_wkt_parse.c"
break;
-#line 2709 "lwin_wkt_parse.c"
+#line 2715 "lwin_wkt_parse.c"
default: break;
}
@@ -2943,6 +2949,6 @@
#endif
return yyresult;
}
-#line 541 "lwin_wkt_parse.y"
+#line 542 "lwin_wkt_parse.y"
Modified: trunk/liblwgeom/lwin_wkt_parse.y
===================================================================
--- trunk/liblwgeom/lwin_wkt_parse.y 2019-10-14 11:17:59 UTC (rev 17917)
+++ trunk/liblwgeom/lwin_wkt_parse.y 2019-10-15 12:08:44 UTC (rev 17918)
@@ -193,6 +193,7 @@
%destructor { lwgeom_free($$); } curvering
%destructor { lwgeom_free($$); } geometry_no_srid
%destructor { lwgeom_free($$); } geometrycollection
+%destructor { lwgeom_free($$); } geometry_list
%destructor { lwgeom_free($$); } linestring
%destructor { lwgeom_free($$); } linestring_untagged
%destructor { lwgeom_free($$); } multicurve
More information about the postgis-tickets
mailing list