]> granicus.if.org Git - postgis/commitdiff
Remove many warnings from -pedantic build, and clean up parser globals a little more...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 9 Nov 2012 00:09:35 +0000 (00:09 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 9 Nov 2012 00:09:35 +0000 (00:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10661 b70326c6-7e19-0410-871a-916f4a2858ee

16 files changed:
liblwgeom/cunit/cu_libgeom.c
liblwgeom/cunit/cu_out_gml.c
liblwgeom/cunit/cu_split.c
liblwgeom/lwgeodetic_tree.c
liblwgeom/lwgeom_api.c
liblwgeom/lwgeom_geos.c
liblwgeom/lwin_wkt.c
liblwgeom/lwin_wkt_lex.c
liblwgeom/lwin_wkt_lex.l
liblwgeom/lwin_wkt_parse.c
liblwgeom/lwin_wkt_parse.h
liblwgeom/lwin_wkt_parse.y
liblwgeom/lwout_x3d.c
liblwgeom/measures3d.c
postgis/lwgeom_dumppoints.c
postgis/lwgeom_in_geojson.c

index 512659d4315becc61819af4cba6d45a9c0f8abc7..44d7cbffda67cf231a5d2dd1cce4044b9c692f58 100644 (file)
@@ -470,7 +470,8 @@ static void do_lwgeom_flip_coordinates(char *in, char *out)
        g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE);
        lwgeom_add_bbox(g);
 
-       if ( testbox = (g->bbox != NULL) )
+       testbox = (g->bbox != NULL);
+       if ( testbox )
        {
                xmax = g->bbox->xmax;
                ymax = g->bbox->ymax;
index 3e9ab801501c4e0afd10d318947cfd13c9e457d1..0bc50838cba51628da16381d53dc720dde83dbc0 100644 (file)
@@ -975,7 +975,7 @@ static void out_gml2_extent(void)
 
        /* GML2: MultiPolygon */
        do_gml2_extent_test(
-           "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6))))",
+           "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6)))",
            "<Box><coordinates>-15,-6 14,14</coordinates></Box>",
            NULL, 15, "");
 
@@ -1053,7 +1053,7 @@ static void out_gml3_extent(void)
 
        /* GML3: MultiPolygon */
        do_gml3_extent_test(
-           "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6))))",
+           "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6)))",
            "<Envelope><lowerCorner>-15 -6</lowerCorner><upperCorner>14 14</upperCorner></Envelope>",
            NULL, 15, 0, "");
 
index e0a94a4f2334944d36ce18ed5ffb0e0f54238fd6..a7646c31100060dec8fb6c7f8c04708174a8fdd2 100644 (file)
@@ -30,7 +30,7 @@ static void test_lwline_split_by_point_to(void)
        coll = lwmline_construct_empty(SRID_UNKNOWN, 0, 0);
        CU_ASSERT_EQUAL(coll->ngeoms, 0);
 
-       line = lwgeom_as_lwline(lwgeom_from_wkt("LINESTRING(0 0,5 5, 10 0))",
+       line = lwgeom_as_lwline(lwgeom_from_wkt("LINESTRING(0 0,5 5, 10 0)",
                LW_PARSER_CHECK_NONE));
        CU_ASSERT(line != NULL);
 
index f06812650e7778e22edc40d7d11742aeb618c9a9..3b72435ebfa3dd70f6aa82dd279a6e4211e2fde5 100644 (file)
@@ -412,7 +412,6 @@ int circ_tree_contains_point(const CIRC_NODE* node, const POINT2D* pt, const POI
        * If the stabline doesn't cross within the radius of a node, there's no 
        * way it can cross.
        */
-//     circ_tree_print(node, 0);
                
        LWDEBUGF(3, "working on node %p, edge_num %d, radius %g, center POINT(%g %g)", node, node->edge_num, node->radius, rad2deg(node->center.lon), rad2deg(node->center.lat));
        d = edge_distance_to_point(&stab_edge, &(node->center), &closest);
index 5301204a0a01a780e29a8af450868c0d622cea2f..c8611d06c7858cc50f0612e82dc9a3587412a26c 100644 (file)
@@ -479,8 +479,9 @@ getPoint2d_cp(const POINTARRAY *pa, int n)
 void
 ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d)
 {
+       uint8_t *ptr;
        assert(n >= 0 && n < pa->npoints);
-       uint8_t *ptr=getPoint_internal(pa, n);
+       ptr=getPoint_internal(pa, n);
        switch ( FLAGS_GET_ZM(pa->flags) )
        {
        case 3:
index c2d1d4fb18ffcfedb0c1e73a3110be03931a6e75..309f691665a7298a9060436fd943aecee7b50b2f 100644 (file)
@@ -837,9 +837,10 @@ findFaceHoles(Face** faces, int nfaces)
       const GEOSGeometry *hole = GEOSGetInteriorRingN(f->geom, h);
       LWDEBUGF(2, "Looking for hole %d/%d of face %d among %d other faces", h+1, nholes, i, nfaces-i-1);
       for (j=i+1; j<nfaces; ++j) {
+               const GEOSGeometry *f2er;
         Face* f2 = faces[j];
         if ( f2->parent ) continue; /* hole already assigned */
-        const GEOSGeometry *f2er = GEOSGetExteriorRing(f2->geom); 
+        f2er = GEOSGetExteriorRing(f2->geom); 
         /* TODO: can be optimized as the ring would have the
          *       same vertices, possibly in different order.
          *       maybe comparing number of points could already be
index 1bd74f1c871edc6f2590731045c52c15fc343e41..b7262bcbb2d21f01b1f7f361bf07ec84912121e6 100644 (file)
@@ -56,7 +56,7 @@ int wkt_lexer_read_srid(char *str)
        srid = clamp_srid((int)i);
        /* TODO: warn on explicit UNKNOWN srid ? */
        return srid;
-};
+}
 
 static uint8_t wkt_dimensionality(char *dimensionality)
 {
@@ -201,7 +201,7 @@ POINT wkt_parser_coord_2(double c1, double c2)
        FLAGS_SET_Z(p.flags, 0);
        FLAGS_SET_M(p.flags, 0);
        return p;
-};
+}
 
 /**
 * Note, if this is an XYM coordinate we'll have to fix it later when we build
@@ -218,7 +218,7 @@ POINT wkt_parser_coord_3(double c1, double c2, double c3)
                FLAGS_SET_Z(p.flags, 1);
                FLAGS_SET_M(p.flags, 0);
                return p;
-};
+}
 
 /**
 */
@@ -233,7 +233,7 @@ POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4)
        FLAGS_SET_Z(p.flags, 1);
        FLAGS_SET_M(p.flags, 1);
        return p;
-};
+}
 
 POINTARRAY* wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
 {
@@ -276,8 +276,8 @@ POINTARRAY* wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
 POINTARRAY* wkt_parser_ptarray_new(POINT p)
 {
        int ndims = FLAGS_NDIMS(p.flags);
-       LWDEBUG(4,"entered");
        POINTARRAY *pa = ptarray_construct_empty((ndims>2), (ndims>3), 4);
+       LWDEBUG(4,"entered");
        if ( ! pa )
        {
                SET_PARSER_ERROR(PARSER_ERROR_OTHER);
@@ -825,9 +825,15 @@ void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
 void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result)
 {
        if ( parser_result->geom )
+       {
                lwgeom_free(parser_result->geom);
+               parser_result->geom = 0;
+       }
        if ( parser_result->serialized_lwgeom )
+       {
                lwfree(parser_result->serialized_lwgeom );
+               parser_result->serialized_lwgeom = 0;
+       }
        /* We don't free parser_result->message because
           it is a const *char */
 }
@@ -840,7 +846,10 @@ LWGEOM *lwgeom_from_wkt(const char *wkt, const char check)
        LWGEOM_PARSER_RESULT r;
 
        if( LW_FAILURE == lwgeom_parse_wkt(&r, (char*)wkt, check) )
+       {
                lwerror(r.message);
+               return NULL;
+       }
        
        return r.geom;  
 }
index 6826fcd56d959a7620a7bc6bfb016637fe91cc5f..a9e13147d39f6bca77572021e4b3abaadb4758b7 100644 (file)
@@ -655,7 +655,7 @@ static void wkt_lexer_unknown()
        global_parser_result.errcode = PARSER_ERROR_OTHER;
        global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
        global_parser_result.errlocation = wkt_yylloc.last_column;
-};
+}
 
 
 /* 
@@ -672,7 +672,7 @@ static void wkt_lexer_unknown()
        } while (0);
 
  
-#line 675 "lwin_wkt_lex.c"
+#line 676 "lwin_wkt_lex.c"
 
 #define INITIAL 0
 
@@ -852,10 +852,10 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
     
-#line 63 "lwin_wkt_lex.l"
+#line 64 "lwin_wkt_lex.l"
 
 
-#line 858 "lwin_wkt_lex.c"
+#line 859 "lwin_wkt_lex.c"
 
        if ( !(yy_init) )
                {
@@ -936,7 +936,7 @@ do_action:  /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 65 "lwin_wkt_lex.l"
+#line 66 "lwin_wkt_lex.l"
 {  
        LWDEBUG(5,"DOUBLE");
        wkt_yylval.doublevalue = atof(wkt_yytext); 
@@ -945,7 +945,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 71 "lwin_wkt_lex.l"
+#line 72 "lwin_wkt_lex.l"
 { 
        LWDEBUG(5,"SRID");
        wkt_yylval.integervalue = wkt_lexer_read_srid(wkt_yytext); 
@@ -954,87 +954,87 @@ YY_RULE_SETUP
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 77 "lwin_wkt_lex.l"
+#line 78 "lwin_wkt_lex.l"
 { return COLLECTION_TOK; }
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 78 "lwin_wkt_lex.l"
+#line 79 "lwin_wkt_lex.l"
 { return MSURFACE_TOK; }
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 79 "lwin_wkt_lex.l"
+#line 80 "lwin_wkt_lex.l"
 { return MPOLYGON_TOK; }
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 80 "lwin_wkt_lex.l"
+#line 81 "lwin_wkt_lex.l"
 { return MCURVE_TOK; }
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 81 "lwin_wkt_lex.l"
+#line 82 "lwin_wkt_lex.l"
 { return MLINESTRING_TOK; }
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 82 "lwin_wkt_lex.l"
+#line 83 "lwin_wkt_lex.l"
 { return MPOINT_TOK; }
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 83 "lwin_wkt_lex.l"
+#line 84 "lwin_wkt_lex.l"
 { return CURVEPOLYGON_TOK; }
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 84 "lwin_wkt_lex.l"
+#line 85 "lwin_wkt_lex.l"
 { return POLYGON_TOK; }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 85 "lwin_wkt_lex.l"
+#line 86 "lwin_wkt_lex.l"
 { return COMPOUNDCURVE_TOK; }
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 86 "lwin_wkt_lex.l"
+#line 87 "lwin_wkt_lex.l"
 { return CIRCULARSTRING_TOK; }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 87 "lwin_wkt_lex.l"
+#line 88 "lwin_wkt_lex.l"
 { return LINESTRING_TOK; }
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 88 "lwin_wkt_lex.l"
+#line 89 "lwin_wkt_lex.l"
 { return POLYHEDRALSURFACE_TOK; }
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 89 "lwin_wkt_lex.l"
+#line 90 "lwin_wkt_lex.l"
 { return TRIANGLE_TOK; }
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 90 "lwin_wkt_lex.l"
+#line 91 "lwin_wkt_lex.l"
 { return TIN_TOK; }
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 91 "lwin_wkt_lex.l"
+#line 92 "lwin_wkt_lex.l"
 { return POINT_TOK; }
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 92 "lwin_wkt_lex.l"
+#line 93 "lwin_wkt_lex.l"
 { return EMPTY_TOK; }
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 94 "lwin_wkt_lex.l"
+#line 95 "lwin_wkt_lex.l"
 { 
        LWDEBUG(5,"DIMENSIONALITY");
        wkt_yylval.stringvalue = wkt_yytext;
@@ -1043,33 +1043,33 @@ YY_RULE_SETUP
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 100 "lwin_wkt_lex.l"
+#line 101 "lwin_wkt_lex.l"
 { LWDEBUG(5,"LBRACKET"); return LBRACKET_TOK; }
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 101 "lwin_wkt_lex.l"
+#line 102 "lwin_wkt_lex.l"
 { LWDEBUG(5,"RBRACKET"); return RBRACKET_TOK; }
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 102 "lwin_wkt_lex.l"
+#line 103 "lwin_wkt_lex.l"
 { LWDEBUG(5,"COMMA"); return COMMA_TOK; }
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 103 "lwin_wkt_lex.l"
+#line 104 "lwin_wkt_lex.l"
 { LWDEBUG(5,"SEMICOLON"); return SEMICOLON_TOK; }
        YY_BREAK
 case 24:
 /* rule 24 can match eol */
 YY_RULE_SETUP
-#line 105 "lwin_wkt_lex.l"
+#line 106 "lwin_wkt_lex.l"
 { /* ignore whitespace */ LWDEBUG(5,"WHITESPACE"); }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 107 "lwin_wkt_lex.l"
+#line 108 "lwin_wkt_lex.l"
 { /* Error out and stop parsing on unknown/unexpected characters */
        LWDEBUG(5,"UNKNOWN"); 
        wkt_lexer_unknown();
@@ -1078,10 +1078,10 @@ YY_RULE_SETUP
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 113 "lwin_wkt_lex.l"
+#line 114 "lwin_wkt_lex.l"
 ECHO;
        YY_BREAK
-#line 1084 "lwin_wkt_lex.c"
+#line 1085 "lwin_wkt_lex.c"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -2038,7 +2038,7 @@ void wkt_yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 113 "lwin_wkt_lex.l"
+#line 114 "lwin_wkt_lex.l"
 
 
 
index ed08b84082d65a27a8cc8e92caa53a4de23e8ada..5d20ce6f0240e558f2b255b349a0f282382f4ba4 100644 (file)
@@ -36,7 +36,7 @@ static void wkt_lexer_unknown()
        global_parser_result.errcode = PARSER_ERROR_OTHER;
        global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
        global_parser_result.errlocation = wkt_yylloc.last_column;
-};
+}
 
 
 /* 
index efd1c377e4799c766cb0d95af6aa80a1d994c325..96b8c8663bada317a3799aed2fb56e4b5ed3d055 100644 (file)
@@ -127,12 +127,7 @@ int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int pars
        int parse_rv = 0;
 
        /* Clean up our global parser result. */
-       global_parser_result.geom = NULL;
-       global_parser_result.message = NULL;
-       global_parser_result.serialized_lwgeom = NULL;
-       global_parser_result.errcode = 0;
-       global_parser_result.errlocation = 0;
-       global_parser_result.size = 0;
+    lwgeom_parser_result_init(&global_parser_result);
 
        /* Set the input text string, and parse checks. */
        global_parser_result.wkinput = wktstr;
@@ -174,7 +169,7 @@ int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int pars
 
 
 /* Line 268 of yacc.c  */
-#line 178 "y.tab.c"
+#line 173 "lwin_wkt_parse.c"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -259,7 +254,7 @@ typedef union YYSTYPE
 {
 
 /* Line 293 of yacc.c  */
-#line 103 "lwin_wkt_parse.y"
+#line 98 "lwin_wkt_parse.y"
 
        int integervalue;
        double doublevalue;
@@ -271,7 +266,7 @@ typedef union YYSTYPE
 
 
 /* Line 293 of yacc.c  */
-#line 275 "y.tab.c"
+#line 270 "lwin_wkt_parse.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -296,7 +291,7 @@ typedef struct YYLTYPE
 
 
 /* Line 343 of yacc.c  */
-#line 300 "y.tab.c"
+#line 295 "lwin_wkt_parse.c"
 
 #ifdef short
 # undef short
@@ -648,20 +643,20 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   207,   207,   209,   213,   214,   215,   216,   217,   218,
-     219,   220,   221,   222,   223,   224,   225,   226,   227,   230,
-     232,   234,   236,   240,   242,   246,   248,   250,   252,   256,
-     258,   260,   262,   264,   266,   270,   272,   274,   276,   280,
-     282,   284,   286,   290,   292,   294,   296,   300,   302,   306,
-     308,   312,   314,   316,   318,   322,   324,   328,   331,   333,
-     335,   337,   341,   343,   347,   348,   349,   350,   353,   355,
-     359,   361,   365,   368,   371,   373,   375,   377,   381,   383,
-     385,   387,   389,   391,   395,   397,   399,   401,   405,   407,
-     409,   411,   413,   415,   417,   419,   423,   425,   427,   429,
-     433,   435,   439,   441,   443,   445,   449,   451,   453,   455,
-     459,   461,   465,   467,   471,   473,   475,   477,   481,   485,
-     487,   489,   491,   495,   497,   501,   503,   505,   509,   511,
-     513,   515,   519,   521,   525,   527,   529
+       0,   202,   202,   204,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   225,
+     227,   229,   231,   235,   237,   241,   243,   245,   247,   251,
+     253,   255,   257,   259,   261,   265,   267,   269,   271,   275,
+     277,   279,   281,   285,   287,   289,   291,   295,   297,   301,
+     303,   307,   309,   311,   313,   317,   319,   323,   326,   328,
+     330,   332,   336,   338,   342,   343,   344,   345,   348,   350,
+     354,   356,   360,   363,   366,   368,   370,   372,   376,   378,
+     380,   382,   384,   386,   390,   392,   394,   396,   400,   402,
+     404,   406,   408,   410,   412,   414,   418,   420,   422,   424,
+     428,   430,   434,   436,   438,   440,   444,   446,   448,   450,
+     454,   456,   460,   462,   466,   468,   470,   472,   476,   480,
+     482,   484,   486,   490,   492,   496,   498,   500,   504,   506,
+     508,   510,   514,   516,   520,   522,   524
 };
 #endif
 
@@ -1488,326 +1483,326 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
       case 28: /* "geometry_no_srid" */
 
 /* Line 1391 of yacc.c  */
-#line 185 "lwin_wkt_parse.y"
+#line 180 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1496 "y.tab.c"
+#line 1491 "lwin_wkt_parse.c"
        break;
       case 29: /* "geometrycollection" */
 
 /* Line 1391 of yacc.c  */
-#line 186 "lwin_wkt_parse.y"
+#line 181 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1505 "y.tab.c"
+#line 1500 "lwin_wkt_parse.c"
        break;
       case 31: /* "multisurface" */
 
 /* Line 1391 of yacc.c  */
-#line 193 "lwin_wkt_parse.y"
+#line 188 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1514 "y.tab.c"
+#line 1509 "lwin_wkt_parse.c"
        break;
       case 32: /* "surface_list" */
 
 /* Line 1391 of yacc.c  */
-#line 172 "lwin_wkt_parse.y"
+#line 167 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1523 "y.tab.c"
+#line 1518 "lwin_wkt_parse.c"
        break;
       case 33: /* "tin" */
 
 /* Line 1391 of yacc.c  */
-#line 200 "lwin_wkt_parse.y"
+#line 195 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1532 "y.tab.c"
+#line 1527 "lwin_wkt_parse.c"
        break;
       case 34: /* "polyhedralsurface" */
 
 /* Line 1391 of yacc.c  */
-#line 199 "lwin_wkt_parse.y"
+#line 194 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1541 "y.tab.c"
+#line 1536 "lwin_wkt_parse.c"
        break;
       case 35: /* "multipolygon" */
 
 /* Line 1391 of yacc.c  */
-#line 192 "lwin_wkt_parse.y"
+#line 187 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1550 "y.tab.c"
+#line 1545 "lwin_wkt_parse.c"
        break;
       case 36: /* "polygon_list" */
 
 /* Line 1391 of yacc.c  */
-#line 173 "lwin_wkt_parse.y"
+#line 168 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1559 "y.tab.c"
+#line 1554 "lwin_wkt_parse.c"
        break;
       case 37: /* "patch_list" */
 
 /* Line 1391 of yacc.c  */
-#line 174 "lwin_wkt_parse.y"
+#line 169 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1568 "y.tab.c"
+#line 1563 "lwin_wkt_parse.c"
        break;
       case 38: /* "polygon" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "lwin_wkt_parse.y"
+#line 191 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1577 "y.tab.c"
+#line 1572 "lwin_wkt_parse.c"
        break;
       case 39: /* "polygon_untagged" */
 
 /* Line 1391 of yacc.c  */
-#line 198 "lwin_wkt_parse.y"
+#line 193 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1586 "y.tab.c"
+#line 1581 "lwin_wkt_parse.c"
        break;
       case 40: /* "patch" */
 
 /* Line 1391 of yacc.c  */
-#line 197 "lwin_wkt_parse.y"
+#line 192 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1595 "y.tab.c"
+#line 1590 "lwin_wkt_parse.c"
        break;
       case 41: /* "curvepolygon" */
 
 /* Line 1391 of yacc.c  */
-#line 183 "lwin_wkt_parse.y"
+#line 178 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1604 "y.tab.c"
+#line 1599 "lwin_wkt_parse.c"
        break;
       case 42: /* "curvering_list" */
 
 /* Line 1391 of yacc.c  */
-#line 170 "lwin_wkt_parse.y"
+#line 165 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1613 "y.tab.c"
+#line 1608 "lwin_wkt_parse.c"
        break;
       case 43: /* "curvering" */
 
 /* Line 1391 of yacc.c  */
-#line 184 "lwin_wkt_parse.y"
+#line 179 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1622 "y.tab.c"
+#line 1617 "lwin_wkt_parse.c"
        break;
       case 44: /* "patchring_list" */
 
 /* Line 1391 of yacc.c  */
-#line 180 "lwin_wkt_parse.y"
+#line 175 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1631 "y.tab.c"
+#line 1626 "lwin_wkt_parse.c"
        break;
       case 45: /* "ring_list" */
 
 /* Line 1391 of yacc.c  */
-#line 179 "lwin_wkt_parse.y"
+#line 174 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1640 "y.tab.c"
+#line 1635 "lwin_wkt_parse.c"
        break;
       case 46: /* "patchring" */
 
 /* Line 1391 of yacc.c  */
-#line 169 "lwin_wkt_parse.y"
+#line 164 "lwin_wkt_parse.y"
        { ptarray_free((yyvaluep->ptarrayvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1649 "y.tab.c"
+#line 1644 "lwin_wkt_parse.c"
        break;
       case 47: /* "ring" */
 
 /* Line 1391 of yacc.c  */
-#line 168 "lwin_wkt_parse.y"
+#line 163 "lwin_wkt_parse.y"
        { ptarray_free((yyvaluep->ptarrayvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1658 "y.tab.c"
+#line 1653 "lwin_wkt_parse.c"
        break;
       case 48: /* "compoundcurve" */
 
 /* Line 1391 of yacc.c  */
-#line 182 "lwin_wkt_parse.y"
+#line 177 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1667 "y.tab.c"
+#line 1662 "lwin_wkt_parse.c"
        break;
       case 49: /* "compound_list" */
 
 /* Line 1391 of yacc.c  */
-#line 178 "lwin_wkt_parse.y"
+#line 173 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1676 "y.tab.c"
+#line 1671 "lwin_wkt_parse.c"
        break;
       case 50: /* "multicurve" */
 
 /* Line 1391 of yacc.c  */
-#line 189 "lwin_wkt_parse.y"
+#line 184 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1685 "y.tab.c"
+#line 1680 "lwin_wkt_parse.c"
        break;
       case 51: /* "curve_list" */
 
 /* Line 1391 of yacc.c  */
-#line 177 "lwin_wkt_parse.y"
+#line 172 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1694 "y.tab.c"
+#line 1689 "lwin_wkt_parse.c"
        break;
       case 52: /* "multilinestring" */
 
 /* Line 1391 of yacc.c  */
-#line 190 "lwin_wkt_parse.y"
+#line 185 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1703 "y.tab.c"
+#line 1698 "lwin_wkt_parse.c"
        break;
       case 53: /* "linestring_list" */
 
 /* Line 1391 of yacc.c  */
-#line 176 "lwin_wkt_parse.y"
+#line 171 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1712 "y.tab.c"
+#line 1707 "lwin_wkt_parse.c"
        break;
       case 54: /* "circularstring" */
 
 /* Line 1391 of yacc.c  */
-#line 181 "lwin_wkt_parse.y"
+#line 176 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1721 "y.tab.c"
+#line 1716 "lwin_wkt_parse.c"
        break;
       case 55: /* "linestring" */
 
 /* Line 1391 of yacc.c  */
-#line 187 "lwin_wkt_parse.y"
+#line 182 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1730 "y.tab.c"
+#line 1725 "lwin_wkt_parse.c"
        break;
       case 56: /* "linestring_untagged" */
 
 /* Line 1391 of yacc.c  */
-#line 188 "lwin_wkt_parse.y"
+#line 183 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1739 "y.tab.c"
+#line 1734 "lwin_wkt_parse.c"
        break;
       case 57: /* "triangle_list" */
 
 /* Line 1391 of yacc.c  */
-#line 171 "lwin_wkt_parse.y"
+#line 166 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1748 "y.tab.c"
+#line 1743 "lwin_wkt_parse.c"
        break;
       case 58: /* "triangle" */
 
 /* Line 1391 of yacc.c  */
-#line 201 "lwin_wkt_parse.y"
+#line 196 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1757 "y.tab.c"
+#line 1752 "lwin_wkt_parse.c"
        break;
       case 59: /* "triangle_untagged" */
 
 /* Line 1391 of yacc.c  */
-#line 202 "lwin_wkt_parse.y"
+#line 197 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1766 "y.tab.c"
+#line 1761 "lwin_wkt_parse.c"
        break;
       case 60: /* "multipoint" */
 
 /* Line 1391 of yacc.c  */
-#line 191 "lwin_wkt_parse.y"
+#line 186 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1775 "y.tab.c"
+#line 1770 "lwin_wkt_parse.c"
        break;
       case 61: /* "point_list" */
 
 /* Line 1391 of yacc.c  */
-#line 175 "lwin_wkt_parse.y"
+#line 170 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1784 "y.tab.c"
+#line 1779 "lwin_wkt_parse.c"
        break;
       case 62: /* "point_untagged" */
 
 /* Line 1391 of yacc.c  */
-#line 195 "lwin_wkt_parse.y"
+#line 190 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1793 "y.tab.c"
+#line 1788 "lwin_wkt_parse.c"
        break;
       case 63: /* "point" */
 
 /* Line 1391 of yacc.c  */
-#line 194 "lwin_wkt_parse.y"
+#line 189 "lwin_wkt_parse.y"
        { lwgeom_free((yyvaluep->geometryvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1802 "y.tab.c"
+#line 1797 "lwin_wkt_parse.c"
        break;
       case 64: /* "ptarray" */
 
 /* Line 1391 of yacc.c  */
-#line 167 "lwin_wkt_parse.y"
+#line 162 "lwin_wkt_parse.y"
        { ptarray_free((yyvaluep->ptarrayvalue)); };
 
 /* Line 1391 of yacc.c  */
-#line 1811 "y.tab.c"
+#line 1806 "lwin_wkt_parse.c"
        break;
 
       default:
@@ -2137,952 +2132,952 @@ yyreduce:
         case 2:
 
 /* Line 1806 of yacc.c  */
-#line 208 "lwin_wkt_parse.y"
+#line 203 "lwin_wkt_parse.y"
     { wkt_parser_geometry_new((yyvsp[(1) - (1)].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
     break;
 
   case 3:
 
 /* Line 1806 of yacc.c  */
-#line 210 "lwin_wkt_parse.y"
+#line 205 "lwin_wkt_parse.y"
     { wkt_parser_geometry_new((yyvsp[(3) - (3)].geometryvalue), (yyvsp[(1) - (3)].integervalue)); WKT_ERROR(); }
     break;
 
   case 4:
 
 /* Line 1806 of yacc.c  */
-#line 213 "lwin_wkt_parse.y"
+#line 208 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 5:
 
 /* Line 1806 of yacc.c  */
-#line 214 "lwin_wkt_parse.y"
+#line 209 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 6:
 
 /* Line 1806 of yacc.c  */
-#line 215 "lwin_wkt_parse.y"
+#line 210 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 7:
 
 /* Line 1806 of yacc.c  */
-#line 216 "lwin_wkt_parse.y"
+#line 211 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 8:
 
 /* Line 1806 of yacc.c  */
-#line 217 "lwin_wkt_parse.y"
+#line 212 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 9:
 
 /* Line 1806 of yacc.c  */
-#line 218 "lwin_wkt_parse.y"
+#line 213 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 10:
 
 /* Line 1806 of yacc.c  */
-#line 219 "lwin_wkt_parse.y"
+#line 214 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 11:
 
 /* Line 1806 of yacc.c  */
-#line 220 "lwin_wkt_parse.y"
+#line 215 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 12:
 
 /* Line 1806 of yacc.c  */
-#line 221 "lwin_wkt_parse.y"
+#line 216 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 13:
 
 /* Line 1806 of yacc.c  */
-#line 222 "lwin_wkt_parse.y"
+#line 217 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 14:
 
 /* Line 1806 of yacc.c  */
-#line 223 "lwin_wkt_parse.y"
+#line 218 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 15:
 
 /* Line 1806 of yacc.c  */
-#line 224 "lwin_wkt_parse.y"
+#line 219 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 16:
 
 /* Line 1806 of yacc.c  */
-#line 225 "lwin_wkt_parse.y"
+#line 220 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 17:
 
 /* Line 1806 of yacc.c  */
-#line 226 "lwin_wkt_parse.y"
+#line 221 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 18:
 
 /* Line 1806 of yacc.c  */
-#line 227 "lwin_wkt_parse.y"
+#line 222 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 19:
 
 /* Line 1806 of yacc.c  */
-#line 231 "lwin_wkt_parse.y"
+#line 226 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 20:
 
 /* Line 1806 of yacc.c  */
-#line 233 "lwin_wkt_parse.y"
+#line 228 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 21:
 
 /* Line 1806 of yacc.c  */
-#line 235 "lwin_wkt_parse.y"
+#line 230 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 22:
 
 /* Line 1806 of yacc.c  */
-#line 237 "lwin_wkt_parse.y"
+#line 232 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 23:
 
 /* Line 1806 of yacc.c  */
-#line 241 "lwin_wkt_parse.y"
+#line 236 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 24:
 
 /* Line 1806 of yacc.c  */
-#line 243 "lwin_wkt_parse.y"
+#line 238 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 25:
 
 /* Line 1806 of yacc.c  */
-#line 247 "lwin_wkt_parse.y"
+#line 242 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 26:
 
 /* Line 1806 of yacc.c  */
-#line 249 "lwin_wkt_parse.y"
+#line 244 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 27:
 
 /* Line 1806 of yacc.c  */
-#line 251 "lwin_wkt_parse.y"
+#line 246 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 28:
 
 /* Line 1806 of yacc.c  */
-#line 253 "lwin_wkt_parse.y"
+#line 248 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 29:
 
 /* Line 1806 of yacc.c  */
-#line 257 "lwin_wkt_parse.y"
+#line 252 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 30:
 
 /* Line 1806 of yacc.c  */
-#line 259 "lwin_wkt_parse.y"
+#line 254 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 31:
 
 /* Line 1806 of yacc.c  */
-#line 261 "lwin_wkt_parse.y"
+#line 256 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 32:
 
 /* Line 1806 of yacc.c  */
-#line 263 "lwin_wkt_parse.y"
+#line 258 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 33:
 
 /* Line 1806 of yacc.c  */
-#line 265 "lwin_wkt_parse.y"
+#line 260 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 34:
 
 /* Line 1806 of yacc.c  */
-#line 267 "lwin_wkt_parse.y"
+#line 262 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 35:
 
 /* Line 1806 of yacc.c  */
-#line 271 "lwin_wkt_parse.y"
+#line 266 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 36:
 
 /* Line 1806 of yacc.c  */
-#line 273 "lwin_wkt_parse.y"
+#line 268 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 37:
 
 /* Line 1806 of yacc.c  */
-#line 275 "lwin_wkt_parse.y"
+#line 270 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 38:
 
 /* Line 1806 of yacc.c  */
-#line 277 "lwin_wkt_parse.y"
+#line 272 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 39:
 
 /* Line 1806 of yacc.c  */
-#line 281 "lwin_wkt_parse.y"
+#line 276 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 40:
 
 /* Line 1806 of yacc.c  */
-#line 283 "lwin_wkt_parse.y"
+#line 278 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 41:
 
 /* Line 1806 of yacc.c  */
-#line 285 "lwin_wkt_parse.y"
+#line 280 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 42:
 
 /* Line 1806 of yacc.c  */
-#line 287 "lwin_wkt_parse.y"
+#line 282 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 43:
 
 /* Line 1806 of yacc.c  */
-#line 291 "lwin_wkt_parse.y"
+#line 286 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 44:
 
 /* Line 1806 of yacc.c  */
-#line 293 "lwin_wkt_parse.y"
+#line 288 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 45:
 
 /* Line 1806 of yacc.c  */
-#line 295 "lwin_wkt_parse.y"
+#line 290 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 46:
 
 /* Line 1806 of yacc.c  */
-#line 297 "lwin_wkt_parse.y"
+#line 292 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 47:
 
 /* Line 1806 of yacc.c  */
-#line 301 "lwin_wkt_parse.y"
+#line 296 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 48:
 
 /* Line 1806 of yacc.c  */
-#line 303 "lwin_wkt_parse.y"
+#line 298 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 49:
 
 /* Line 1806 of yacc.c  */
-#line 307 "lwin_wkt_parse.y"
+#line 302 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 50:
 
 /* Line 1806 of yacc.c  */
-#line 309 "lwin_wkt_parse.y"
+#line 304 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 51:
 
 /* Line 1806 of yacc.c  */
-#line 313 "lwin_wkt_parse.y"
+#line 308 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 52:
 
 /* Line 1806 of yacc.c  */
-#line 315 "lwin_wkt_parse.y"
+#line 310 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 53:
 
 /* Line 1806 of yacc.c  */
-#line 317 "lwin_wkt_parse.y"
+#line 312 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 54:
 
 /* Line 1806 of yacc.c  */
-#line 319 "lwin_wkt_parse.y"
+#line 314 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 55:
 
 /* Line 1806 of yacc.c  */
-#line 323 "lwin_wkt_parse.y"
+#line 318 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); }
     break;
 
   case 56:
 
 /* Line 1806 of yacc.c  */
-#line 325 "lwin_wkt_parse.y"
+#line 320 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 57:
 
 /* Line 1806 of yacc.c  */
-#line 328 "lwin_wkt_parse.y"
+#line 323 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); }
     break;
 
   case 58:
 
 /* Line 1806 of yacc.c  */
-#line 332 "lwin_wkt_parse.y"
+#line 327 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 59:
 
 /* Line 1806 of yacc.c  */
-#line 334 "lwin_wkt_parse.y"
+#line 329 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 60:
 
 /* Line 1806 of yacc.c  */
-#line 336 "lwin_wkt_parse.y"
+#line 331 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 61:
 
 /* Line 1806 of yacc.c  */
-#line 338 "lwin_wkt_parse.y"
+#line 333 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 62:
 
 /* Line 1806 of yacc.c  */
-#line 342 "lwin_wkt_parse.y"
+#line 337 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 63:
 
 /* Line 1806 of yacc.c  */
-#line 344 "lwin_wkt_parse.y"
+#line 339 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 64:
 
 /* Line 1806 of yacc.c  */
-#line 347 "lwin_wkt_parse.y"
+#line 342 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 65:
 
 /* Line 1806 of yacc.c  */
-#line 348 "lwin_wkt_parse.y"
+#line 343 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 66:
 
 /* Line 1806 of yacc.c  */
-#line 349 "lwin_wkt_parse.y"
+#line 344 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 67:
 
 /* Line 1806 of yacc.c  */
-#line 350 "lwin_wkt_parse.y"
+#line 345 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
     break;
 
   case 68:
 
 /* Line 1806 of yacc.c  */
-#line 354 "lwin_wkt_parse.y"
+#line 349 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'Z'); WKT_ERROR(); }
     break;
 
   case 69:
 
 /* Line 1806 of yacc.c  */
-#line 356 "lwin_wkt_parse.y"
+#line 351 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'Z'); WKT_ERROR(); }
     break;
 
   case 70:
 
 /* Line 1806 of yacc.c  */
-#line 360 "lwin_wkt_parse.y"
+#line 355 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'2'); WKT_ERROR(); }
     break;
 
   case 71:
 
 /* Line 1806 of yacc.c  */
-#line 362 "lwin_wkt_parse.y"
+#line 357 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'2'); WKT_ERROR(); }
     break;
 
   case 72:
 
 /* Line 1806 of yacc.c  */
-#line 365 "lwin_wkt_parse.y"
+#line 360 "lwin_wkt_parse.y"
     { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); }
     break;
 
   case 73:
 
 /* Line 1806 of yacc.c  */
-#line 368 "lwin_wkt_parse.y"
+#line 363 "lwin_wkt_parse.y"
     { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); }
     break;
 
   case 74:
 
 /* Line 1806 of yacc.c  */
-#line 372 "lwin_wkt_parse.y"
+#line 367 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 75:
 
 /* Line 1806 of yacc.c  */
-#line 374 "lwin_wkt_parse.y"
+#line 369 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 76:
 
 /* Line 1806 of yacc.c  */
-#line 376 "lwin_wkt_parse.y"
+#line 371 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 77:
 
 /* Line 1806 of yacc.c  */
-#line 378 "lwin_wkt_parse.y"
+#line 373 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 78:
 
 /* Line 1806 of yacc.c  */
-#line 382 "lwin_wkt_parse.y"
+#line 377 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 79:
 
 /* Line 1806 of yacc.c  */
-#line 384 "lwin_wkt_parse.y"
+#line 379 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 80:
 
 /* Line 1806 of yacc.c  */
-#line 386 "lwin_wkt_parse.y"
+#line 381 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 81:
 
 /* Line 1806 of yacc.c  */
-#line 388 "lwin_wkt_parse.y"
+#line 383 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 82:
 
 /* Line 1806 of yacc.c  */
-#line 390 "lwin_wkt_parse.y"
+#line 385 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 83:
 
 /* Line 1806 of yacc.c  */
-#line 392 "lwin_wkt_parse.y"
+#line 387 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 84:
 
 /* Line 1806 of yacc.c  */
-#line 396 "lwin_wkt_parse.y"
+#line 391 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 85:
 
 /* Line 1806 of yacc.c  */
-#line 398 "lwin_wkt_parse.y"
+#line 393 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 86:
 
 /* Line 1806 of yacc.c  */
-#line 400 "lwin_wkt_parse.y"
+#line 395 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 87:
 
 /* Line 1806 of yacc.c  */
-#line 402 "lwin_wkt_parse.y"
+#line 397 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 88:
 
 /* Line 1806 of yacc.c  */
-#line 406 "lwin_wkt_parse.y"
+#line 401 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 89:
 
 /* Line 1806 of yacc.c  */
-#line 408 "lwin_wkt_parse.y"
+#line 403 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 90:
 
 /* Line 1806 of yacc.c  */
-#line 410 "lwin_wkt_parse.y"
+#line 405 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 91:
 
 /* Line 1806 of yacc.c  */
-#line 412 "lwin_wkt_parse.y"
+#line 407 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 92:
 
 /* Line 1806 of yacc.c  */
-#line 414 "lwin_wkt_parse.y"
+#line 409 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 93:
 
 /* Line 1806 of yacc.c  */
-#line 416 "lwin_wkt_parse.y"
+#line 411 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 94:
 
 /* Line 1806 of yacc.c  */
-#line 418 "lwin_wkt_parse.y"
+#line 413 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 95:
 
 /* Line 1806 of yacc.c  */
-#line 420 "lwin_wkt_parse.y"
+#line 415 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 96:
 
 /* Line 1806 of yacc.c  */
-#line 424 "lwin_wkt_parse.y"
+#line 419 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 97:
 
 /* Line 1806 of yacc.c  */
-#line 426 "lwin_wkt_parse.y"
+#line 421 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 98:
 
 /* Line 1806 of yacc.c  */
-#line 428 "lwin_wkt_parse.y"
+#line 423 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 99:
 
 /* Line 1806 of yacc.c  */
-#line 430 "lwin_wkt_parse.y"
+#line 425 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 100:
 
 /* Line 1806 of yacc.c  */
-#line 434 "lwin_wkt_parse.y"
+#line 429 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 101:
 
 /* Line 1806 of yacc.c  */
-#line 436 "lwin_wkt_parse.y"
+#line 431 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 102:
 
 /* Line 1806 of yacc.c  */
-#line 440 "lwin_wkt_parse.y"
+#line 435 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 103:
 
 /* Line 1806 of yacc.c  */
-#line 442 "lwin_wkt_parse.y"
+#line 437 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 104:
 
 /* Line 1806 of yacc.c  */
-#line 444 "lwin_wkt_parse.y"
+#line 439 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 105:
 
 /* Line 1806 of yacc.c  */
-#line 446 "lwin_wkt_parse.y"
+#line 441 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 106:
 
 /* Line 1806 of yacc.c  */
-#line 450 "lwin_wkt_parse.y"
+#line 445 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 107:
 
 /* Line 1806 of yacc.c  */
-#line 452 "lwin_wkt_parse.y"
+#line 447 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 108:
 
 /* Line 1806 of yacc.c  */
-#line 454 "lwin_wkt_parse.y"
+#line 449 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 109:
 
 /* Line 1806 of yacc.c  */
-#line 456 "lwin_wkt_parse.y"
+#line 451 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 110:
 
 /* Line 1806 of yacc.c  */
-#line 460 "lwin_wkt_parse.y"
+#line 455 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(2) - (3)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 111:
 
 /* Line 1806 of yacc.c  */
-#line 462 "lwin_wkt_parse.y"
+#line 457 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 112:
 
 /* Line 1806 of yacc.c  */
-#line 466 "lwin_wkt_parse.y"
+#line 461 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 113:
 
 /* Line 1806 of yacc.c  */
-#line 468 "lwin_wkt_parse.y"
+#line 463 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 114:
 
 /* Line 1806 of yacc.c  */
-#line 472 "lwin_wkt_parse.y"
+#line 467 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(4) - (6)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 115:
 
 /* Line 1806 of yacc.c  */
-#line 474 "lwin_wkt_parse.y"
+#line 469 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(5) - (7)].ptarrayvalue), (yyvsp[(2) - (7)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 116:
 
 /* Line 1806 of yacc.c  */
-#line 476 "lwin_wkt_parse.y"
+#line 471 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 117:
 
 /* Line 1806 of yacc.c  */
-#line 478 "lwin_wkt_parse.y"
+#line 473 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 118:
 
 /* Line 1806 of yacc.c  */
-#line 482 "lwin_wkt_parse.y"
+#line 477 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(3) - (5)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 119:
 
 /* Line 1806 of yacc.c  */
-#line 486 "lwin_wkt_parse.y"
+#line 481 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
     break;
 
   case 120:
 
 /* Line 1806 of yacc.c  */
-#line 488 "lwin_wkt_parse.y"
+#line 483 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 121:
 
 /* Line 1806 of yacc.c  */
-#line 490 "lwin_wkt_parse.y"
+#line 485 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 122:
 
 /* Line 1806 of yacc.c  */
-#line 492 "lwin_wkt_parse.y"
+#line 487 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL); WKT_ERROR(); }
     break;
 
   case 123:
 
 /* Line 1806 of yacc.c  */
-#line 496 "lwin_wkt_parse.y"
+#line 491 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 124:
 
 /* Line 1806 of yacc.c  */
-#line 498 "lwin_wkt_parse.y"
+#line 493 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
     break;
 
   case 125:
 
 /* Line 1806 of yacc.c  */
-#line 502 "lwin_wkt_parse.y"
+#line 497 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)),NULL); WKT_ERROR(); }
     break;
 
   case 126:
 
 /* Line 1806 of yacc.c  */
-#line 504 "lwin_wkt_parse.y"
+#line 499 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(2) - (3)].coordinatevalue)),NULL); WKT_ERROR(); }
     break;
 
   case 127:
 
 /* Line 1806 of yacc.c  */
-#line 506 "lwin_wkt_parse.y"
+#line 501 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
     break;
 
   case 128:
 
 /* Line 1806 of yacc.c  */
-#line 510 "lwin_wkt_parse.y"
+#line 505 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
     break;
 
   case 129:
 
 /* Line 1806 of yacc.c  */
-#line 512 "lwin_wkt_parse.y"
+#line 507 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 130:
 
 /* Line 1806 of yacc.c  */
-#line 514 "lwin_wkt_parse.y"
+#line 509 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
     break;
 
   case 131:
 
 /* Line 1806 of yacc.c  */
-#line 516 "lwin_wkt_parse.y"
+#line 511 "lwin_wkt_parse.y"
     { (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
     break;
 
   case 132:
 
 /* Line 1806 of yacc.c  */
-#line 520 "lwin_wkt_parse.y"
+#line 515 "lwin_wkt_parse.y"
     { (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[(1) - (3)].ptarrayvalue), (yyvsp[(3) - (3)].coordinatevalue)); WKT_ERROR(); }
     break;
 
   case 133:
 
 /* Line 1806 of yacc.c  */
-#line 522 "lwin_wkt_parse.y"
+#line 517 "lwin_wkt_parse.y"
     { (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)); WKT_ERROR(); }
     break;
 
   case 134:
 
 /* Line 1806 of yacc.c  */
-#line 526 "lwin_wkt_parse.y"
+#line 521 "lwin_wkt_parse.y"
     { (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[(1) - (2)].doublevalue), (yyvsp[(2) - (2)].doublevalue)); WKT_ERROR(); }
     break;
 
   case 135:
 
 /* Line 1806 of yacc.c  */
-#line 528 "lwin_wkt_parse.y"
+#line 523 "lwin_wkt_parse.y"
     { (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[(1) - (3)].doublevalue), (yyvsp[(2) - (3)].doublevalue), (yyvsp[(3) - (3)].doublevalue)); WKT_ERROR(); }
     break;
 
   case 136:
 
 /* Line 1806 of yacc.c  */
-#line 530 "lwin_wkt_parse.y"
+#line 525 "lwin_wkt_parse.y"
     { (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[(1) - (4)].doublevalue), (yyvsp[(2) - (4)].doublevalue), (yyvsp[(3) - (4)].doublevalue), (yyvsp[(4) - (4)].doublevalue)); WKT_ERROR(); }
     break;
 
 
 
 /* Line 1806 of yacc.c  */
-#line 3086 "y.tab.c"
+#line 3081 "lwin_wkt_parse.c"
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -3320,7 +3315,7 @@ yyreturn:
 
 
 /* Line 2067 of yacc.c  */
-#line 532 "lwin_wkt_parse.y"
+#line 527 "lwin_wkt_parse.y"
 
 
 
index b7d4d394e1358d19c60b5935d4ba393da248afb1..d294fb81c024f69fdb841b7b6c32e33fd78f7a58 100644 (file)
@@ -1,24 +1,21 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.5.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+/* Bison interface for Yacc-like parsers in C
+   
+      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 102 "lwin_wkt_parse.y"
 {
+
+/* Line 2068 of yacc.c  */
+#line 98 "lwin_wkt_parse.y"
+
        int integervalue;
        double doublevalue;
        char *stringvalue;
        LWGEOM *geometryvalue;
        POINT coordinatevalue;
        POINTARRAY *ptarrayvalue;
-}
-/* Line 1529 of yacc.c.  */
-#line 108 "lwin_wkt_parse.h"
-       YYSTYPE;
+
+
+
+/* Line 2068 of yacc.c  */
+#line 111 "lwin_wkt_parse.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 extern YYSTYPE wkt_yylval;
@@ -127,3 +130,4 @@ typedef struct YYLTYPE
 #endif
 
 extern YYLTYPE wkt_yylloc;
+
index 2f41402fc4b85afc2d93dbadcbfca104b4469bcd..9a937d1c6a842c99a3e567b2ebe05841cfdbc7d8 100644 (file)
@@ -50,12 +50,7 @@ int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int pars
        int parse_rv = 0;
 
        /* Clean up our global parser result. */
-       global_parser_result.geom = NULL;
-       global_parser_result.message = NULL;
-       global_parser_result.serialized_lwgeom = NULL;
-       global_parser_result.errcode = 0;
-       global_parser_result.errlocation = 0;
-       global_parser_result.size = 0;
+    lwgeom_parser_result_init(&global_parser_result);
 
        /* Set the input text string, and parse checks. */
        global_parser_result.wkinput = wktstr;
index e3ff033d2425b065353b3f4709d41b3fe0b1fd86..a1a9c4a34a8bd6ecb57ce57eadabbf4b022a97d5 100644 (file)
@@ -96,11 +96,11 @@ static size_t
 asx3d3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *defid)
 {
        int size;
-       //size_t defidlen = strlen(defid);
+       /* size_t defidlen = strlen(defid); */
 
        size = pointArray_X3Dsize(point->point, precision);
-       //size += ( sizeof("<point><pos>/") + (defidlen*2) ) * 2;
-       //if (srs)     size += strlen(srs) + sizeof(" srsName=..");
+       /* size += ( sizeof("<point><pos>/") + (defidlen*2) ) * 2; */
+       /* if (srs)     size += strlen(srs) + sizeof(" srsName=.."); */
        return size;
 }
 
@@ -108,19 +108,19 @@ static size_t
 asx3d3_point_buf(const LWPOINT *point, char *srs, char *output, int precision, int opts, const char *defid)
 {
        char *ptr = output;
-       //int dimension=2;
+       /* int dimension=2; */
 
-       //if (FLAGS_GET_Z(point->flags)) dimension = 3;
+       /* if (FLAGS_GET_Z(point->flags)) dimension = 3; */
        /*      if ( srs )
                {
                        ptr += sprintf(ptr, "<%sPoint srsName=\"%s\">", defid, srs);
                }
                else*/
-       //ptr += sprintf(ptr, "%s", defid);
+       /* ptr += sprintf(ptr, "%s", defid); */
 
-       //ptr += sprintf(ptr, "<%spos>", defid);
+       /* ptr += sprintf(ptr, "<%spos>", defid); */
        ptr += pointArray_toX3D3(point->point, ptr, precision, opts, 0);
-       //ptr += sprintf(ptr, "</%spos></%sPoint>", defid, defid);
+       /* ptr += sprintf(ptr, "</%spos></%sPoint>", defid, defid); */
 
        return (ptr-output);
 }
@@ -150,7 +150,7 @@ asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const c
                    sizeof("<LineSet vertexCount=''><Coordinate point='' /></LineSet>")  + defidlen
                ) * 2;
 
-       //if (srs)     size += strlen(srs) + sizeof(" srsName=..");
+       /* if (srs)     size += strlen(srs) + sizeof(" srsName=.."); */
        return size;
 }
 
@@ -158,11 +158,11 @@ static size_t
 asx3d3_line_buf(const LWLINE *line, char *srs, char *output, int precision, int opts, const char *defid)
 {
        char *ptr=output;
-       //int dimension=2;
+       /* int dimension=2; */
        POINTARRAY *pa;
 
 
-       //if (FLAGS_GET_Z(line->flags)) dimension = 3;
+       /* if (FLAGS_GET_Z(line->flags)) dimension = 3; */
 
        pa = line->points;
        ptr += sprintf(ptr, "<LineSet %s vertexCount='%d'>", defid, pa->npoints);
@@ -181,7 +181,7 @@ static size_t
 asx3d3_line_coords(const LWLINE *line, char *output, int precision, int opts)
 {
        char *ptr=output;
-       //ptr += sprintf(ptr, "");
+       /* ptr += sprintf(ptr, ""); */
        ptr += pointArray_toX3D3(line->points, ptr, precision, opts, lwline_is_closed(line));
        return (ptr-output);
 }
@@ -202,7 +202,7 @@ asx3d3_mline_coordindex(const LWMLINE *mgeom, char *output)
                geom = (LWLINE *) mgeom->geoms[i];
                pa = geom->points;
                np = pa->npoints;
-               si = j; //start index of first point of linestring
+               si = j;  /* start index of first point of linestring */
                for (k=0; k < np ; k++)
                {
                        if (k)
@@ -224,7 +224,7 @@ asx3d3_mline_coordindex(const LWMLINE *mgeom, char *output)
                }
                if (i < (mgeom->ngeoms - 1) )
                {
-                       ptr += sprintf(ptr, " -1 "); //separator for each linestring
+                       ptr += sprintf(ptr, " -1 "); /* separator for each linestring */
                }
        }
        return (ptr-output);
@@ -266,12 +266,12 @@ asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output)
                                *  For now will leave it as polygons stacked on top of each other -- which is what we are doing here and perhaps an option
                                *  to color differently.  It's not ideal but the alternative sounds complicated.
                                **/
-                               ptr += sprintf(ptr, " -1 "); //separator for each inner ring. Ideally we should probably triangulate and cut around as others do
+                               ptr += sprintf(ptr, " -1 "); /* separator for each inner ring. Ideally we should probably triangulate and cut around as others do */
                        }
                }
                if (i < (psur->ngeoms - 1) )
                {
-                       ptr += sprintf(ptr, " -1 "); //separator for each subgeom
+                       ptr += sprintf(ptr, " -1 "); /* separator for each subgeom */
                }
        }
        return (ptr-output);
@@ -319,7 +319,7 @@ asx3d3_poly_buf(const LWPOLY *poly, char *srs, char *output, int precision, int
        ptr += pointArray_toX3D3(poly->rings[0], ptr, precision, opts, 1);
        for (i=1; i<poly->nrings; i++)
        {
-               ptr += sprintf(ptr, " "); //inner ring points start
+               ptr += sprintf(ptr, " "); /* inner ring points start */
                ptr += pointArray_toX3D3(poly->rings[i], ptr, precision, opts,1);
        }
        return (ptr-output);
@@ -376,24 +376,24 @@ asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, c
        /* the longest possible multi version needs to hold DEF=defid and coordinate breakout */
        size = sizeof("<PointSet><Coordinate point='' /></PointSet>") + defidlen;
 
-       //if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
+       /* if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); */
 
        for (i=0; i<col->ngeoms; i++)
        {
                subgeom = col->geoms[i];
                if (subgeom->type == POINTTYPE)
                {
-                       //size += ( sizeof("point=''") + defidlen ) * 2;
+                       /* size += ( sizeof("point=''") + defidlen ) * 2; */
                        size += asx3d3_point_size((LWPOINT*)subgeom, 0, precision, opts, defid);
                }
                else if (subgeom->type == LINETYPE)
                {
-                       //size += ( sizeof("<curveMember>/") + defidlen ) * 2;
+                       /* size += ( sizeof("<curveMember>/") + defidlen ) * 2; */
                        size += asx3d3_line_size((LWLINE*)subgeom, 0, precision, opts, defid);
                }
                else if (subgeom->type == POLYGONTYPE)
                {
-                       //size += ( sizeof("<surfaceMember>/") + defidlen ) * 2;
+                       /* size += ( sizeof("<surfaceMember>/") + defidlen ) * 2; */
                        size += asx3d3_poly_size((LWPOLY*)subgeom, 0, precision, opts, defid);
                }
        }
@@ -544,7 +544,7 @@ asx3d3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precisi
                }
                if (i < (psur->ngeoms - 1) )
                {
-                       ptr += sprintf(ptr, " -1 "); //separator for each subgeom
+                       ptr += sprintf(ptr, " -1 "); /* separator for each subgeom */
                }
                j += k;
        }
@@ -556,7 +556,7 @@ asx3d3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precisi
                ptr += asx3d3_poly_buf(psur->geoms[i], 0, ptr, precision, opts, 1, defid);
                if (i < (psur->ngeoms - 1) )
                {
-                       ptr += sprintf(ptr, " "); //only add a trailing space if its not the last polygon in the set
+                       ptr += sprintf(ptr, " "); /* only add a trailing space if its not the last polygon in the set */
                }
        }
 
@@ -588,7 +588,7 @@ asx3d3_tin_size(const LWTIN *tin, char *srs, int precision, int opts, const char
        int i;
        size_t size;
        size_t defidlen = strlen(defid);
-       //int dimension=2;
+       /* int dimension=2; */
 
        /** Need to make space for size of additional attributes,
        ** the coordIndex has a value for each edge for each triangle plus a space to separate so we need at least that much extra room ***/
@@ -612,7 +612,7 @@ asx3d3_tin_buf(const LWTIN *tin, char *srs, char *output, int precision, int opt
        char *ptr;
        int i;
        int k;
-       //int dimension=2;
+       /* int dimension=2; */
 
        ptr = output;
 
index b29e6b728e060c36ce4dd9440cd11f8344ce475f..2494e53ba7fee8f284e1723b6ea5e91cdde65360 100644 (file)
@@ -378,9 +378,9 @@ point to point calculation
 int
 lw_dist3d_point_point(LWPOINT *point1, LWPOINT *point2, DISTPTS3D *dl)
 {
-       LWDEBUG(2, "lw_dist3d_point_point is called");
        POINT3DZ p1;
        POINT3DZ p2;
+       LWDEBUG(2, "lw_dist3d_point_point is called");
 
        getPoint3dz_p(point1->point, 0, &p1);
        getPoint3dz_p(point2->point, 0, &p2);
@@ -394,9 +394,9 @@ point to line calculation
 int
 lw_dist3d_point_line(LWPOINT *point, LWLINE *line, DISTPTS3D *dl)
 {
-       LWDEBUG(2, "lw_dist3d_point_line is called");
        POINT3DZ p;
        POINTARRAY *pa = line->points;
+       LWDEBUG(2, "lw_dist3d_point_line is called");
 
        getPoint3dz_p(point->point, 0, &p);
        return lw_dist3d_pt_ptarray(&p, pa, dl);
@@ -416,9 +416,9 @@ for max distance it is always point against boundary
 int
 lw_dist3d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS3D *dl)
 {
-       LWDEBUG(2, "lw_dist3d_point_poly is called");
        POINT3DZ p, projp;/*projp is "point projected on plane"*/
        PLANE3D plane;
+       LWDEBUG(2, "lw_dist3d_point_poly is called");
        getPoint3dz_p(point->point, 0, &p);
        
        /*If we are lookig for max distance, longestline or dfullywithin*/
@@ -446,9 +446,9 @@ line to line calculation
 int
 lw_dist3d_line_line(LWLINE *line1, LWLINE *line2, DISTPTS3D *dl)
 {
-       LWDEBUG(2, "lw_dist3d_line_line is called");
        POINTARRAY *pa1 = line1->points;
        POINTARRAY *pa2 = line2->points;
+       LWDEBUG(2, "lw_dist3d_line_line is called");
 
        return lw_dist3d_ptarray_ptarray(pa1, pa2, dl);
 }
@@ -459,8 +459,8 @@ line to polygon calculation
 */
 int lw_dist3d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS3D *dl)
 {
-       LWDEBUG(2, "lw_dist3d_line_poly is called");    
        PLANE3D plane;  
+       LWDEBUG(2, "lw_dist3d_line_poly is called");    
                
        if (dl->mode == DIST_MAX)
        {
@@ -479,8 +479,8 @@ polygon to polygon calculation
 */
 int lw_dist3d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS3D *dl)
 {              
-       LWDEBUG(2, "lw_dist3d_poly_poly is called");
        PLANE3D plane;          
+       LWDEBUG(2, "lw_dist3d_poly_poly is called");
        if (dl->mode == DIST_MAX)
        {
                return lw_dist3d_ptarray_ptarray(poly1->rings[0], poly2->rings[0], dl);
@@ -597,11 +597,11 @@ depending on dl->mode (max or min)
 int
 lw_dist3d_pt_pt(POINT3DZ *thep1, POINT3DZ *thep2,DISTPTS3D *dl)
 {
-       LWDEBUGF(2, "lw_dist3d_pt_pt called (with points: p1.x=%f, p1.y=%f,p1.z=%f,p2.x=%f, p2.y=%f,p2.z=%f)",thep1->x,thep1->y,thep1->z,thep2->x,thep2->y,thep2->z );
        double dx = thep2->x - thep1->x;
        double dy = thep2->y - thep1->y;
        double dz = thep2->z - thep1->z;
        double dist = sqrt ( dx*dx + dy*dy + dz*dz);
+       LWDEBUGF(2, "lw_dist3d_pt_pt called (with points: p1.x=%f, p1.y=%f,p1.z=%f,p2.x=%f, p2.y=%f,p2.z=%f)",thep1->x,thep1->y,thep1->z,thep2->x,thep2->y,thep2->z );
 
        if (((dl->distance - dist)*(dl->mode))>0) /*multiplication with mode to handle mindistance (mode=1)  and maxdistance (mode = (-1)*/
        {
@@ -629,11 +629,11 @@ Finds all combinationes of segments between two pointarrays
 int
 lw_dist3d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS3D *dl)
 {
-       LWDEBUGF(2, "lw_dist3d_ptarray_ptarray called (points: %d-%d)",l1->npoints, l2->npoints);
        int t,u;
        POINT3DZ        start, end;
        POINT3DZ        start2, end2;
        int twist = dl->twisted;
+       LWDEBUGF(2, "lw_dist3d_ptarray_ptarray called (points: %d-%d)",l1->npoints, l2->npoints);
 
 
 
@@ -683,6 +683,11 @@ Finds the two closest points on two linesegments
 int 
 lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2, DISTPTS3D *dl)
 {
+       VECTOR3D v1, v2, vl;
+       double s1k, s2k; /*two variables representing where on Line 1 (s1k) and where on Line 2 (s2k) a connecting line between the two lines is perpendicular to both lines*/
+       POINT3DZ p1, p2;
+       double a, b, c, d, e, D;
+                       
        /*s1p1 and s1p2 are the same point */
        if (  ( s1p1->x == s1p2->x) && (s1p1->y == s1p2->y) && (s1p1->z == s1p2->y) )
        {
@@ -694,19 +699,13 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2
                dl->twisted= ((dl->twisted) * (-1));
                return lw_dist3d_pt_seg(s2p1,s1p1,s1p2,dl);
        }
-       
-       
+               
 /*
        Here we use algorithm from softsurfer.com
        that can be found here
        http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm
 */
        
-       
-       VECTOR3D v1, v2, vl;
-       double s1k, s2k; /*two variables representing where on Line 1 (s1k) and where on Line 2 (s2k) a connecting line between the two lines is perpendicular to both lines*/
-       POINT3DZ p1, p2;
-                       
        if (!get_3dvector_from_points(s1p1, s1p2, &v1))
                return LW_FALSE;        
 
@@ -716,12 +715,12 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2
        if (!get_3dvector_from_points(s2p1, s1p1, &vl))
                return LW_FALSE;        
 
-       double    a = DOT(v1,v1);
-       double    b = DOT(v1,v2);
-       double    c = DOT(v2,v2);
-       double    d = DOT(v1,vl);
-       double    e = DOT(v2,vl);
-       double    D = a*c - b*b; 
+       a = DOT(v1,v1);
+       b = DOT(v1,v2);
+       c = DOT(v2,v2);
+       d = DOT(v1,vl);
+       e = DOT(v2,vl);
+       D = a*c - b*b; 
 
 
        if (D <0.000000001) 
@@ -854,6 +853,7 @@ int lw_dist3d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly,PLANE3D *plane, DISTPTS3
        
        for (i=1;i<pa->npoints;i++)
        {               
+               int intersects;
                getPoint3dz_p(pa, i, &p2);
                s2=project_point_on_plane(&p2, plane, &projp2); 
                lw_dist3d_pt_poly(&p2, poly, plane,&projp2, dl);
@@ -870,7 +870,7 @@ int lw_dist3d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly,PLANE3D *plane, DISTPTS3
                        intersectionp.y=projp1.y+f*projp1_projp2.y;
                        intersectionp.z=projp1.z+f*projp1_projp2.z;
                        
-                       int intersects = LW_TRUE; /*We set intersects to true until the opposite is proved*/
+                       intersects = LW_TRUE; /*We set intersects to true until the opposite is proved*/
                        
                        if(pt_in_ring_3d(&intersectionp, poly->rings[0], plane)) /*Inside outer ring*/
                        {
index ebf93e610b667cdf5a60636e11a3cc769d0f5104..109b3d1f864661d3a9b688189493ec49ed0b3851 100644 (file)
@@ -14,6 +14,8 @@
  * this entire file is in the public domain
  */
 
+Datum LWGEOM_dumppoints(PG_FUNCTION_ARGS);
+
 struct dumpnode {
        LWGEOM *geom;
        int idx; /* which member geom we're working on */
@@ -40,7 +42,6 @@ struct dumpstate {
 };
 
 PG_FUNCTION_INFO_V1(LWGEOM_dumppoints);
-
 Datum LWGEOM_dumppoints(PG_FUNCTION_ARGS) {
        FuncCallContext *funcctx;
        MemoryContext oldcontext, newcontext;
index fc912249b9c336e33050ab2cd93e81f5ccfb80f0..d3970da432e049bf07c4d604223b656ae332619b 100644 (file)
@@ -17,7 +17,7 @@
 #include "liblwgeom.h"
 
 Datum geom_from_geojson(PG_FUNCTION_ARGS);
-
+Datum postgis_libjson_version(PG_FUNCTION_ARGS);
 
 static void geojson_lwerror(char *msg, int error_code)
 {