[mapserver-commits] r10342 -
sandbox/sdlime/common-expressions/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Jul 13 00:45:38 EDT 2010
Author: sdlime
Date: 2010-07-13 04:45:38 +0000 (Tue, 13 Jul 2010)
New Revision: 10342
Modified:
sandbox/sdlime/common-expressions/mapserver/mapparser.c
sandbox/sdlime/common-expressions/mapserver/mapparser.y
Log:
Added EQ and DISJOINT operators for shape literals.
Modified: sandbox/sdlime/common-expressions/mapserver/mapparser.c
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapparser.c 2010-07-13 04:37:03 UTC (rev 10341)
+++ sandbox/sdlime/common-expressions/mapserver/mapparser.c 2010-07-13 04:45:38 UTC (rev 10342)
@@ -286,16 +286,16 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 29
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 257
+#define YYLAST 260
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 43
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 8
/* YYNRULES -- Number of rules. */
-#define YYNRULES 60
+#define YYNRULES 62
/* YYNRULES -- Number of states. */
-#define YYNSTATES 125
+#define YYNSTATES 129
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -347,9 +347,9 @@
26, 30, 34, 38, 42, 45, 48, 52, 56, 60,
64, 68, 72, 76, 80, 84, 88, 92, 96, 100,
104, 108, 112, 116, 120, 124, 128, 132, 136, 140,
- 144, 148, 152, 154, 158, 162, 166, 170, 174, 178,
- 181, 185, 190, 195, 197, 201, 206, 208, 212, 216,
- 218
+ 144, 148, 152, 156, 160, 162, 166, 170, 174, 178,
+ 182, 186, 189, 193, 198, 203, 205, 209, 214, 216,
+ 220, 224, 226
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -369,15 +369,15 @@
50, -1, 50, 17, 50, -1, 50, 18, 50, -1,
50, 15, 50, -1, 50, 16, 50, -1, 49, 14,
49, -1, 47, 14, 49, -1, 47, 13, 47, -1,
- 49, 13, 49, -1, 50, 13, 50, -1, 48, 30,
- 48, -1, 3, -1, 41, 47, 42, -1, 47, 34,
- 47, -1, 47, 35, 47, -1, 47, 36, 47, -1,
- 47, 38, 47, -1, 47, 37, 47, -1, 35, 47,
- -1, 47, 40, 47, -1, 31, 41, 49, 42, -1,
- 32, 41, 48, 42, -1, 7, -1, 41, 48, 42,
- -1, 33, 41, 49, 42, -1, 4, -1, 41, 49,
- 42, -1, 49, 34, 49, -1, 6, -1, 41, 50,
- 42, -1
+ 49, 13, 49, -1, 50, 13, 50, -1, 48, 20,
+ 48, -1, 48, 30, 48, -1, 48, 29, 48, -1,
+ 3, -1, 41, 47, 42, -1, 47, 34, 47, -1,
+ 47, 35, 47, -1, 47, 36, 47, -1, 47, 38,
+ 47, -1, 47, 37, 47, -1, 35, 47, -1, 47,
+ 40, 47, -1, 31, 41, 49, 42, -1, 32, 41,
+ 48, 42, -1, 7, -1, 41, 48, 42, -1, 33,
+ 41, 49, 42, -1, 4, -1, 41, 49, 42, -1,
+ 49, 34, 49, -1, 6, -1, 41, 50, 42, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -387,9 +387,9 @@
116, 124, 133, 141, 150, 151, 152, 165, 171, 177,
183, 189, 195, 201, 202, 210, 218, 227, 235, 243,
251, 257, 263, 269, 275, 281, 287, 308, 329, 335,
- 343, 349, 362, 363, 364, 365, 366, 367, 368, 375,
- 376, 377, 378, 388, 389, 390, 402, 403, 404, 407,
- 408
+ 343, 350, 361, 372, 385, 386, 387, 388, 389, 390,
+ 391, 398, 399, 400, 401, 411, 412, 413, 425, 426,
+ 427, 430, 431
};
#endif
@@ -428,9 +428,9 @@
46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
- 46, 46, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 48, 48, 48, 49, 49, 49, 50,
- 50
+ 46, 46, 46, 46, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 48, 48, 48, 49, 49,
+ 49, 50, 50
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -440,9 +440,9 @@
3, 3, 3, 3, 2, 2, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 1, 3, 3, 3, 3, 3, 3, 2,
- 3, 4, 4, 1, 3, 4, 1, 3, 3, 1,
- 3
+ 3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
+ 3, 2, 3, 4, 4, 1, 3, 4, 1, 3,
+ 3, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -450,25 +450,25 @@
means the default is an error. */
static const unsigned char yydefact[] =
{
- 2, 42, 56, 59, 53, 0, 0, 0, 0, 0,
+ 2, 44, 58, 61, 55, 0, 0, 0, 0, 0,
0, 0, 3, 4, 0, 0, 0, 14, 15, 0,
- 0, 0, 0, 49, 0, 0, 0, 0, 0, 1,
+ 0, 0, 0, 51, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 23, 43, 54, 57, 60, 6, 8, 7,
- 9, 10, 12, 11, 13, 38, 37, 21, 22, 19,
- 20, 18, 17, 44, 45, 46, 48, 47, 50, 41,
- 39, 36, 28, 29, 26, 27, 25, 24, 5, 16,
- 58, 0, 40, 34, 35, 32, 33, 31, 30, 0,
- 51, 0, 52, 55, 0
+ 0, 0, 0, 0, 23, 45, 56, 59, 62, 6,
+ 8, 7, 9, 10, 12, 11, 13, 38, 37, 21,
+ 22, 19, 20, 18, 17, 46, 47, 48, 50, 49,
+ 52, 41, 43, 42, 39, 36, 28, 29, 26, 27,
+ 25, 24, 5, 16, 60, 0, 40, 34, 35, 32,
+ 33, 31, 30, 0, 53, 0, 54, 57, 0
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
- -1, 11, 109, 12, 13, 14, 15, 16
+ -1, 11, 113, 12, 13, 14, 15, 16
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
@@ -476,25 +476,25 @@
#define YYPACT_NINF -31
static const short int yypact[] =
{
- 2, -31, -31, -31, -31, 2, -28, -22, -21, 54,
- 2, 38, 7, 115, 15, 216, 225, -31, 188, -1,
- -5, -1, 54, 4, 5, 104, -20, 151, 171, -31,
- 2, 2, 2, 2, 54, -1, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, -5, -1,
- -1, -1, -1, -1, -1, -1, -1, 33, -1, 1,
- 1, 1, 1, 1, 1, 1, -1, -30, -5, 16,
- 14, -11, -31, -31, -31, -31, -31, 57, 143, -31,
- 188, 57, 143, -31, 188, 217, 39, 217, 217, 217,
- 217, 217, 217, 43, 43, 4, 4, 4, 4, -31,
- 39, 39, 39, 39, 39, 39, 39, 39, -31, -31,
- -31, 1, -31, -31, -31, -31, -31, -31, -31, 36,
- -31, 30, -31, -31, 32
+ 2, -31, -31, -31, -31, 2, 1, 4, 17, 41,
+ 2, 31, 9, 125, -7, 219, 228, -31, 191, 6,
+ -5, 6, 41, 8, 7, 114, 54, 161, 84, -31,
+ 2, 2, 2, 2, 41, 6, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, -5, -5,
+ -5, 6, 6, 6, 6, 6, 6, 6, 6, 42,
+ 6, -3, -3, -3, -3, -3, -3, -3, 6, -30,
+ -5, 18, -27, 53, -31, -31, -31, -31, -31, 48,
+ 153, -31, 191, 48, 153, -31, 191, 220, 36, 220,
+ 220, 220, 220, 220, 220, -11, -11, 8, 8, 8,
+ 8, -31, -31, -31, 36, 36, 36, 36, 36, 36,
+ 36, 36, -31, -31, -31, -3, -31, -31, -31, -31,
+ -31, -31, -31, -18, -31, 33, -31, -31, 35
};
/* YYPGOTO[NTERM-NUM]. */
static const short int yypgoto[] =
{
- -31, -31, -31, 187, 66, -9, 11, -10
+ -31, -31, -31, 187, 76, -9, 11, -10
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -504,62 +504,64 @@
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
- 28, 26, 4, 2, 58, 1, 2, 3, 3, 4,
- 48, 69, 120, 19, 5, 30, 31, 30, 31, 20,
- 21, 27, 74, 42, 43, 44, 45, 46, 8, 47,
- 67, 73, 70, 6, 7, 8, 68, 9, 29, 99,
- 66, 108, 111, 10, 47, 48, 86, 72, 58, 112,
- 113, 114, 115, 116, 117, 118, 123, 1, 122, 121,
- 100, 101, 102, 103, 104, 105, 106, 107, 31, 110,
- 58, 18, 74, 58, 76, 23, 25, 119, 75, 44,
- 45, 46, 0, 47, 0, 6, 7, 0, 71, 9,
- 0, 0, 0, 0, 0, 22, 78, 80, 82, 84,
- 85, 124, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 32, 33, 0, 34, 35, 36,
+ 28, 26, 4, 3, 60, 1, 2, 60, 3, 4,
+ 2, 71, 124, 48, 5, 127, 60, 30, 31, 30,
+ 31, 27, 49, 50, 77, 44, 45, 46, 8, 47,
+ 69, 29, 72, 6, 7, 8, 70, 9, 115, 101,
+ 102, 103, 19, 10, 1, 20, 88, 68, 47, 74,
+ 112, 116, 117, 118, 119, 120, 121, 122, 21, 31,
+ 126, 125, 104, 105, 106, 107, 108, 109, 110, 111,
+ 60, 114, 6, 7, 48, 76, 9, 78, 0, 123,
+ 0, 18, 22, 49, 50, 23, 25, 42, 43, 44,
+ 45, 46, 0, 47, 0, 75, 76, 61, 73, 62,
+ 63, 64, 65, 66, 67, 128, 80, 82, 84, 86,
+ 87, 0, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 98, 99, 100, 32, 33, 78, 34, 35, 36,
37, 38, 39, 40, 41, 32, 33, 0, 34, 35,
36, 37, 38, 39, 40, 41, 0, 0, 42, 43,
- 44, 45, 46, 0, 47, 0, 73, 0, 0, 42,
+ 44, 45, 46, 0, 47, 0, 75, 0, 0, 42,
43, 44, 45, 46, 33, 47, 34, 35, 36, 37,
- 38, 39, 40, 41, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 0, 0, 0, 0, 42, 43, 44,
- 45, 46, 0, 47, 59, 58, 60, 61, 62, 63,
- 64, 65, 17, 75, 0, 0, 0, 24, 0, 0,
- 0, 34, 35, 36, 37, 38, 39, 40, 41, 0,
- 0, 0, 0, 76, 0, 0, 0, 77, 79, 81,
- 83, 0, 42, 43, 44, 45, 46, 0, 47, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 59, 0,
- 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
- 58, 42, 43, 44, 45, 46, 0, 47
+ 38, 39, 40, 41, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 42, 43, 44,
+ 45, 46, 17, 47, 0, 60, 0, 24, 0, 0,
+ 0, 0, 0, 77, 34, 35, 36, 37, 38, 39,
+ 40, 41, 0, 0, 0, 0, 0, 79, 81, 83,
+ 85, 0, 0, 0, 0, 42, 43, 44, 45, 46,
+ 0, 47, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 61, 0, 62, 63, 64, 65, 66, 67, 0,
+ 0, 0, 0, 60, 42, 43, 44, 45, 46, 0,
+ 47
};
static const yysigned_char yycheck[] =
{
- 10, 10, 7, 4, 34, 3, 4, 6, 6, 7,
- 30, 20, 42, 41, 12, 10, 11, 10, 11, 41,
- 41, 10, 42, 34, 35, 36, 37, 38, 33, 40,
- 19, 42, 21, 31, 32, 33, 41, 35, 0, 48,
- 41, 8, 41, 41, 40, 30, 35, 42, 34, 59,
- 60, 61, 62, 63, 64, 65, 42, 3, 42, 68,
- 49, 50, 51, 52, 53, 54, 55, 56, 11, 58,
- 34, 5, 42, 34, 42, 9, 10, 66, 42, 36,
- 37, 38, -1, 40, -1, 31, 32, -1, 22, 35,
- -1, -1, -1, -1, -1, 41, 30, 31, 32, 33,
- 34, 111, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 10, 11, -1, 13, 14, 15,
+ 10, 10, 7, 6, 34, 3, 4, 34, 6, 7,
+ 4, 20, 42, 20, 12, 42, 34, 10, 11, 10,
+ 11, 10, 29, 30, 42, 36, 37, 38, 33, 40,
+ 19, 0, 21, 31, 32, 33, 41, 35, 41, 48,
+ 49, 50, 41, 41, 3, 41, 35, 41, 40, 42,
+ 8, 61, 62, 63, 64, 65, 66, 67, 41, 11,
+ 42, 70, 51, 52, 53, 54, 55, 56, 57, 58,
+ 34, 60, 31, 32, 20, 42, 35, 42, -1, 68,
+ -1, 5, 41, 29, 30, 9, 10, 34, 35, 36,
+ 37, 38, -1, 40, -1, 42, 42, 13, 22, 15,
+ 16, 17, 18, 19, 20, 115, 30, 31, 32, 33,
+ 34, -1, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 10, 11, 42, 13, 14, 15,
16, 17, 18, 19, 20, 10, 11, -1, 13, 14,
15, 16, 17, 18, 19, 20, -1, -1, 34, 35,
36, 37, 38, -1, 40, -1, 42, -1, -1, 34,
35, 36, 37, 38, 11, 40, 13, 14, 15, 16,
17, 18, 19, 20, 13, 14, 15, 16, 17, 18,
19, 20, 21, -1, -1, -1, -1, 34, 35, 36,
- 37, 38, -1, 40, 13, 34, 15, 16, 17, 18,
- 19, 20, 5, 42, -1, -1, -1, 10, -1, -1,
- -1, 13, 14, 15, 16, 17, 18, 19, 20, -1,
- -1, -1, -1, 42, -1, -1, -1, 30, 31, 32,
- 33, -1, 34, 35, 36, 37, 38, -1, 40, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 13, -1,
- 15, 16, 17, 18, 19, 20, -1, -1, -1, -1,
- 34, 34, 35, 36, 37, 38, -1, 40
+ 37, 38, 5, 40, -1, 34, -1, 10, -1, -1,
+ -1, -1, -1, 42, 13, 14, 15, 16, 17, 18,
+ 19, 20, -1, -1, -1, -1, -1, 30, 31, 32,
+ 33, -1, -1, -1, -1, 34, 35, 36, 37, 38,
+ -1, 40, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 13, -1, 15, 16, 17, 18, 19, 20, -1,
+ -1, -1, -1, 34, 34, 35, 36, 37, 38, -1,
+ 40
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -570,15 +572,15 @@
41, 44, 46, 47, 48, 49, 50, 46, 47, 41,
41, 41, 41, 47, 46, 47, 48, 49, 50, 0,
10, 11, 10, 11, 13, 14, 15, 16, 17, 18,
- 19, 20, 34, 35, 36, 37, 38, 40, 30, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 34, 13,
- 15, 16, 17, 18, 19, 20, 41, 49, 41, 48,
- 49, 47, 42, 42, 42, 42, 42, 46, 47, 46,
- 47, 46, 47, 46, 47, 47, 49, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 48,
- 49, 49, 49, 49, 49, 49, 49, 49, 8, 45,
- 49, 41, 50, 50, 50, 50, 50, 50, 50, 49,
- 42, 48, 42, 42, 50
+ 19, 20, 34, 35, 36, 37, 38, 40, 20, 29,
+ 30, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 34, 13, 15, 16, 17, 18, 19, 20, 41, 49,
+ 41, 48, 49, 47, 42, 42, 42, 42, 42, 46,
+ 47, 46, 47, 46, 47, 46, 47, 47, 49, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 48, 48, 48, 49, 49, 49, 49, 49, 49,
+ 49, 49, 8, 45, 49, 41, 50, 50, 50, 50,
+ 50, 50, 50, 49, 42, 48, 42, 42, 50
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1641,9 +1643,24 @@
break;
case 41:
-#line 349 "mapparser.y"
+#line 350 "mapparser.y"
{
int rval;
+ rval = msGEOSEquals((yyvsp[-2].shpval), (yyvsp[0].shpval));
+ if((yyvsp[-2].shpval)->scope == 1) msFreeShape((yyvsp[-2].shpval));
+ if((yyvsp[0].shpval)->scope == 1) msFreeShape((yyvsp[0].shpval));
+ if(rval == -1) {
+ yyerror("Intersects operator failed.");
+ return(-1);
+ } else
+ (yyval.intval) = rval;
+ }
+ break;
+
+ case 42:
+#line 361 "mapparser.y"
+ {
+ int rval;
rval = msGEOSIntersects((yyvsp[-2].shpval), (yyvsp[0].shpval));
if((yyvsp[-2].shpval)->scope == 1) msFreeShape((yyvsp[-2].shpval));
if((yyvsp[0].shpval)->scope == 1) msFreeShape((yyvsp[0].shpval));
@@ -1656,32 +1673,47 @@
break;
case 43:
-#line 363 "mapparser.y"
+#line 372 "mapparser.y"
+ {
+ int rval;
+ rval = msGEOSDisjoint((yyvsp[-2].shpval), (yyvsp[0].shpval));
+ if((yyvsp[-2].shpval)->scope == 1) msFreeShape((yyvsp[-2].shpval));
+ if((yyvsp[0].shpval)->scope == 1) msFreeShape((yyvsp[0].shpval));
+ if(rval == -1) {
+ yyerror("Intersects operator failed.");
+ return(-1);
+ } else
+ (yyval.intval) = rval;
+ }
+ break;
+
+ case 45:
+#line 386 "mapparser.y"
{ (yyval.dblval) = (yyvsp[-1].dblval); }
break;
- case 44:
-#line 364 "mapparser.y"
+ case 46:
+#line 387 "mapparser.y"
{ (yyval.dblval) = (yyvsp[-2].dblval) + (yyvsp[0].dblval); }
break;
- case 45:
-#line 365 "mapparser.y"
+ case 47:
+#line 388 "mapparser.y"
{ (yyval.dblval) = (yyvsp[-2].dblval) - (yyvsp[0].dblval); }
break;
- case 46:
-#line 366 "mapparser.y"
+ case 48:
+#line 389 "mapparser.y"
{ (yyval.dblval) = (yyvsp[-2].dblval) * (yyvsp[0].dblval); }
break;
- case 47:
-#line 367 "mapparser.y"
+ case 49:
+#line 390 "mapparser.y"
{ (yyval.dblval) = (int)(yyvsp[-2].dblval) % (int)(yyvsp[0].dblval); }
break;
- case 48:
-#line 368 "mapparser.y"
+ case 50:
+#line 391 "mapparser.y"
{
if((yyvsp[0].dblval) == 0.0) {
yyerror("Division by zero.");
@@ -1691,23 +1723,23 @@
}
break;
- case 49:
-#line 375 "mapparser.y"
+ case 51:
+#line 398 "mapparser.y"
{ (yyval.dblval) = (yyvsp[0].dblval); }
break;
- case 50:
-#line 376 "mapparser.y"
+ case 52:
+#line 399 "mapparser.y"
{ (yyval.dblval) = pow((yyvsp[-2].dblval), (yyvsp[0].dblval)); }
break;
- case 51:
-#line 377 "mapparser.y"
+ case 53:
+#line 400 "mapparser.y"
{ (yyval.dblval) = strlen((yyvsp[-1].strval)); }
break;
- case 52:
-#line 378 "mapparser.y"
+ case 54:
+#line 401 "mapparser.y"
{
if((yyvsp[-1].shpval)->type != MS_SHAPE_POLYGON) {
yyerror("Area can only be computed for polygon shapes.");
@@ -1718,13 +1750,13 @@
}
break;
- case 54:
-#line 389 "mapparser.y"
+ case 56:
+#line 412 "mapparser.y"
{ (yyval.shpval) = (yyvsp[-1].shpval); }
break;
- case 55:
-#line 390 "mapparser.y"
+ case 57:
+#line 413 "mapparser.y"
{
shapeObj *s;
s = msShapeFromWKT((yyvsp[-1].strval));
@@ -1737,18 +1769,18 @@
}
break;
- case 57:
-#line 403 "mapparser.y"
+ case 59:
+#line 426 "mapparser.y"
{ (yyval.strval) = (yyvsp[-1].strval); free((yyvsp[-1].strval)); }
break;
- case 58:
-#line 404 "mapparser.y"
+ case 60:
+#line 427 "mapparser.y"
{ sprintf((yyval.strval), "%s%s", (yyvsp[-2].strval), (yyvsp[0].strval)); free((yyvsp[-2].strval)); free((yyvsp[0].strval)); }
break;
- case 60:
-#line 408 "mapparser.y"
+ case 62:
+#line 431 "mapparser.y"
{ (yyval.tmval) = (yyvsp[-1].tmval); }
break;
@@ -1756,7 +1788,7 @@
}
/* Line 1037 of yacc.c. */
-#line 1760 "mapparser.c"
+#line 1792 "mapparser.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1984,7 +2016,7 @@
}
-#line 411 "mapparser.y"
+#line 434 "mapparser.y"
/*
Modified: sandbox/sdlime/common-expressions/mapserver/mapparser.y
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapparser.y 2010-07-13 04:37:03 UTC (rev 10341)
+++ sandbox/sdlime/common-expressions/mapserver/mapparser.y 2010-07-13 04:45:38 UTC (rev 10342)
@@ -346,6 +346,18 @@
else
$$ = MS_FALSE;
}
+
+ | shape_exp EQ shape_exp {
+ int rval;
+ rval = msGEOSEquals($1, $3);
+ if($1->scope == 1) msFreeShape($1);
+ if($3->scope == 1) msFreeShape($3);
+ if(rval == -1) {
+ yyerror("Intersects operator failed.");
+ return(-1);
+ } else
+ $$ = rval;
+ }
| shape_exp INTERSECTS shape_exp {
int rval;
rval = msGEOSIntersects($1, $3);
@@ -357,6 +369,17 @@
} else
$$ = rval;
}
+ | shape_exp DISJOINT shape_exp {
+ int rval;
+ rval = msGEOSDisjoint($1, $3);
+ if($1->scope == 1) msFreeShape($1);
+ if($3->scope == 1) msFreeShape($3);
+ if(rval == -1) {
+ yyerror("Intersects operator failed.");
+ return(-1);
+ } else
+ $$ = rval;
+ }
;
math_exp: NUMBER
More information about the mapserver-commits
mailing list