[Groonga-commit] groonga/groonga at 47a29bf [master] geo_in_rectangle: support south/east area

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Dec 7 22:44:20 JST 2013


Kouhei Sutou	2013-12-07 22:44:20 +0900 (Sat, 07 Dec 2013)

  New Revision: 47a29bfc7f0c420c657b405b8797c67f7ea176c4
  https://github.com/groonga/groonga/commit/47a29bfc7f0c420c657b405b8797c67f7ea176c4

  Message:
    geo_in_rectangle: support south/east area

  Added files:
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.test
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.expected
    test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.test
  Modified files:
    lib/geo.c
    test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected
    test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected

  Modified: lib/geo.c (+22 -6)
===================================================================
--- lib/geo.c    2013-12-07 22:30:45 +0900 (2a2c67d)
+++ lib/geo.c    2013-12-07 22:44:20 +0900 (eb0e8bd)
@@ -1057,12 +1057,6 @@ in_rectangle_data_validate(grn_ctx *ctx,
   top_left = data->top_left;
   bottom_right = data->bottom_right;
 
-  if (top_left->latitude < 0 || bottom_right->latitude < 0) {
-    ERR(GRN_FUNCTION_NOT_IMPLEMENTED,
-        "%s: the Southern Hemisphere is not implemented.", process_name);
-    return;
-  }
-
   if (top_left->latitude >= GRN_GEO_MAX_LATITUDE) {
     ERR(GRN_INVALID_ARGUMENT,
         "%s: top left point's latitude is too big: "
@@ -1074,6 +1068,17 @@ in_rectangle_data_validate(grn_ctx *ctx,
     return;
   }
 
+  if (top_left->latitude <= GRN_GEO_MIN_LATITUDE) {
+    ERR(GRN_INVALID_ARGUMENT,
+        "%s: top left point's latitude is too small: "
+        "<%d>(min:%d): (%d,%d) (%d,%d)",
+        process_name,
+        GRN_GEO_MIN_LATITUDE, top_left->latitude,
+        top_left->latitude, top_left->longitude,
+        bottom_right->latitude, bottom_right->longitude);
+    return;
+  }
+
   if (top_left->longitude >= GRN_GEO_MAX_LONGITUDE) {
     ERR(GRN_INVALID_ARGUMENT,
         "%s: top left point's longitude is too big: "
@@ -1107,6 +1112,17 @@ in_rectangle_data_validate(grn_ctx *ctx,
     return;
   }
 
+  if (bottom_right->latitude <= GRN_GEO_MIN_LATITUDE) {
+    ERR(GRN_INVALID_ARGUMENT,
+        "%s: bottom right point's latitude is too small: "
+        "<%d>(min:%d): (%d,%d) (%d,%d)",
+        process_name,
+        GRN_GEO_MIN_LATITUDE, bottom_right->latitude,
+        top_left->latitude, top_left->longitude,
+        bottom_right->latitude, bottom_right->longitude);
+    return;
+  }
+
   if (bottom_right->longitude >= GRN_GEO_MAX_LONGITUDE) {
     ERR(GRN_INVALID_ARGUMENT,
         "%s: bottom right point's longitude is too big: "

  Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected (+3 -3)
===================================================================
--- test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected    2013-12-07 22:30:45 +0900 (c750902)
+++ test/command/suite/select/filter/geo_in_rectangle/invalid/bottom_right_over_min_latitude.expected    2013-12-07 22:44:20 +0900 (4088172)
@@ -2,14 +2,14 @@ select LandMarks --filter 'geo_in_rectangle(point, "0x0", "-90.0x0")'
 [
   [
     [
-      -38,
+      -22,
       0.0,
       0.0
     ],
-    "geo_in_rectangle(): the Southern Hemisphere is not implemented."
+    "geo_in_rectangle(): bottom right point's latitude is too small: <-324000000>(min:-324000000): (0,0) (-324000000,0)"
   ],
   [
 
   ]
 ]
-#|e| geo_in_rectangle(): the Southern Hemisphere is not implemented.
+#|e| geo_in_rectangle(): bottom right point's latitude is too small: <-324000000>(min:-324000000): (0,0) (-324000000,0)

  Modified: test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected (+3 -3)
===================================================================
--- test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected    2013-12-07 22:30:45 +0900 (50f81ec)
+++ test/command/suite/select/filter/geo_in_rectangle/invalid/top_left_over_min_latitude.expected    2013-12-07 22:44:20 +0900 (e3f7f5d)
@@ -2,14 +2,14 @@ select LandMarks --filter 'geo_in_rectangle(point, "-90.0x0", "0x0")'
 [
   [
     [
-      -38,
+      -22,
       0.0,
       0.0
     ],
-    "geo_in_rectangle(): the Southern Hemisphere is not implemented."
+    "geo_in_rectangle(): top left point's latitude is too small: <-324000000>(min:-324000000): (-324000000,0) (0,0)"
   ],
   [
 
   ]
 ]
-#|e| geo_in_rectangle(): the Southern Hemisphere is not implemented.
+#|e| geo_in_rectangle(): top left point's latitude is too small: <-324000000>(min:-324000000): (-324000000,0) (0,0)

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.expected (+69 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.expected    2013-12-07 22:44:20 +0900 (4084a6c)
@@ -0,0 +1,69 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-2x1", "-5x4")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        16
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-2x1"
+      ],
+      [
+        "-2x2"
+      ],
+      [
+        "-2x3"
+      ],
+      [
+        "-2x4"
+      ],
+      [
+        "-3x1"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-3x4"
+      ],
+      [
+        "-4x1"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-4x4"
+      ],
+      [
+        "-5x1"
+      ],
+      [
+        "-5x2"
+      ],
+      [
+        "-5x3"
+      ],
+      [
+        "-5x4"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/all_out.test    2013-12-07 22:44:20 +0900 (357609d)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-2x1", "-5x4")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.expected (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.expected    2013-12-07 22:44:20 +0900 (b409570)
@@ -0,0 +1,39 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x2", "-4x4")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        6
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-3x4"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-4x4"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_out.test    2013-12-07 22:44:20 +0900 (98c8238)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x2", "-4x4")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.expected (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.expected    2013-12-07 22:44:20 +0900 (e09e361)
@@ -0,0 +1,45 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x1", "-4x4")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        8
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x1"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-3x4"
+      ],
+      [
+        "-4x1"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-4x4"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/east_west_out.test    2013-12-07 22:44:20 +0900 (cf24d5c)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x1", "-4x4")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.expected    2013-12-07 22:44:20 +0900 (5ea50fd)
@@ -0,0 +1,48 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-2x2", "-4x4")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-2x2"
+      ],
+      [
+        "-2x3"
+      ],
+      [
+        "-2x4"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-3x4"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-4x4"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_east_out.test    2013-12-07 22:44:20 +0900 (2111d4a)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-2x2", "-4x4")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.expected (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.expected    2013-12-07 22:44:20 +0900 (2fc87b4)
@@ -0,0 +1,39 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-2x2", "-4x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        6
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-2x2"
+      ],
+      [
+        "-2x3"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_out.test    2013-12-07 22:44:20 +0900 (55f4ae0)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-2x2", "-4x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.expected (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.expected    2013-12-07 22:44:20 +0900 (de87003)
@@ -0,0 +1,45 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-2x2", "-5x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        8
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-2x2"
+      ],
+      [
+        "-2x3"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-5x2"
+      ],
+      [
+        "-5x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_south_out.test    2013-12-07 22:44:20 +0900 (a32d1ab)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-2x2", "-5x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.expected    2013-12-07 22:44:20 +0900 (73749da)
@@ -0,0 +1,48 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-2x1", "-4x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-2x1"
+      ],
+      [
+        "-2x2"
+      ],
+      [
+        "-2x3"
+      ],
+      [
+        "-3x1"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x1"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/north_west_out.test    2013-12-07 22:44:20 +0900 (40e4a5d)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-2x1", "-4x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.expected (+33 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.expected    2013-12-07 22:44:20 +0900 (e9c619e)
@@ -0,0 +1,33 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x2", "-4x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        4
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/same_as_mesh.test    2013-12-07 22:44:20 +0900 (998c62b)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x2", "-4x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.expected    2013-12-07 22:44:20 +0900 (796a8e1)
@@ -0,0 +1,48 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x2", "-5x4")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-3x4"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-4x4"
+      ],
+      [
+        "-5x2"
+      ],
+      [
+        "-5x3"
+      ],
+      [
+        "-5x4"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_east_out.test    2013-12-07 22:44:20 +0900 (8b58ef9)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x2", "-5x4")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.expected (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.expected    2013-12-07 22:44:20 +0900 (635d156)
@@ -0,0 +1,39 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x2", "-5x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        6
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-5x2"
+      ],
+      [
+        "-5x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_out.test    2013-12-07 22:44:20 +0900 (2a504db)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x2", "-5x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.expected    2013-12-07 22:44:20 +0900 (65232bd)
@@ -0,0 +1,48 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x1", "-5x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x1"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x1"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ],
+      [
+        "-5x1"
+      ],
+      [
+        "-5x2"
+      ],
+      [
+        "-5x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/south_west_out.test    2013-12-07 22:44:20 +0900 (4d83438)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x1", "-5x3")'

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.expected (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.expected    2013-12-07 22:44:20 +0900 (15930a6)
@@ -0,0 +1,39 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "-3x1", "-4x3")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        6
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "-3x1"
+      ],
+      [
+        "-3x2"
+      ],
+      [
+        "-3x3"
+      ],
+      [
+        "-4x1"
+      ],
+      [
+        "-4x2"
+      ],
+      [
+        "-4x3"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/south_east/use_index/west_out.test    2013-12-07 22:44:20 +0900 (4861da5)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/south_east.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "-3x1", "-4x3")'
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index