[Groonga-commit] groonga/groonga at 7954449 [master] geo_in_rectangle: support east longitude to west longitude with index

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Dec 8 21:37:33 JST 2013


Kouhei Sutou	2013-12-08 21:37:33 +0900 (Sun, 08 Dec 2013)

  New Revision: 7954449e8fdc0df5738ee4dbcbb2e1ec7f120263
  https://github.com/groonga/groonga/commit/7954449e8fdc0df5738ee4dbcbb2e1ec7f120263

  Message:
    geo_in_rectangle: support east longitude to west longitude with index
    
    TODO: Document it.
    
    geo_in_rectangle(column, "200x-100", "100x100") means
    
                 |
            +---200---+
            |    |    |
            +---100---+
                 |
         ---+----+----+---
           -100  |   100
    
    geo_in_rectangle(column, "200x100", "100x-100") means
    
                 |
         ---+   200   +---
            |    |    |
         ---+   100   +---
                 |
         ---+----+----+---
           -100  |   100

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

  Modified: lib/geo.c (+18 -8)
===================================================================
--- lib/geo.c    2013-12-08 21:23:42 +0900 (02c12d6)
+++ lib/geo.c    2013-12-08 21:37:33 +0900 (2ab0568)
@@ -1292,10 +1292,15 @@ extract_rectangle_in_area(grn_ctx *ctx,
   case GRN_GEO_AREA_NORTH_EAST :
     if (GRN_GEO_IN_NORTH_EAST(top_left) ||
         GRN_GEO_IN_NORTH_EAST(bottom_right)) {
-      area_top_left->latitude      = MAX(top_left->latitude,      0);
-      area_top_left->longitude     = MAX(top_left->longitude,     0);
-      area_bottom_right->latitude  = MAX(bottom_right->latitude,  0);
-      area_bottom_right->longitude = MAX(bottom_right->longitude, 0);
+      area_top_left->latitude     = MAX(top_left->latitude,      0);
+      area_bottom_right->latitude = MAX(bottom_right->latitude,  0);
+      if (top_left->longitude > 0 && bottom_right->longitude < 0) {
+        area_top_left->longitude     = top_left->longitude;
+        area_bottom_right->longitude = GRN_GEO_MAX_LONGITUDE;
+      } else {
+        area_top_left->longitude     = MAX(top_left->longitude,     0);
+        area_bottom_right->longitude = MAX(bottom_right->longitude, 0);
+      }
     } else {
       out_of_area = GRN_TRUE;
     }
@@ -1303,10 +1308,15 @@ extract_rectangle_in_area(grn_ctx *ctx,
   case GRN_GEO_AREA_NORTH_WEST :
     if (GRN_GEO_IN_NORTH_WEST(top_left) ||
         GRN_GEO_IN_NORTH_WEST(bottom_right)) {
-      area_top_left->latitude      = MAX(top_left->latitude,       0);
-      area_top_left->longitude     = MIN(top_left->longitude,     -1);
-      area_bottom_right->latitude  = MAX(bottom_right->latitude,   0);
-      area_bottom_right->longitude = MIN(bottom_right->longitude, -1);
+      area_top_left->latitude     = MAX(top_left->latitude,       0);
+      area_bottom_right->latitude = MAX(bottom_right->latitude,   0);
+      if (top_left->longitude > 0 && bottom_right->longitude < 0) {
+        area_top_left->longitude     = GRN_GEO_MIN_LONGITUDE;
+        area_bottom_right->longitude = bottom_right->longitude;
+      } else {
+        area_top_left->longitude     = MIN(top_left->longitude,     -1);
+        area_bottom_right->longitude = MIN(bottom_right->longitude, -1);
+      }
     } else {
       out_of_area = GRN_TRUE;
     }

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/all_out.expected (+93 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/all_out.expected    2013-12-08 21:37:33 +0900 (37e208c)
@@ -0,0 +1,93 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "4x647999997", "1x-647999997")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        24
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "1x-647999999"
+      ],
+      [
+        "1x-647999998"
+      ],
+      [
+        "1x-647999997"
+      ],
+      [
+        "1x647999997"
+      ],
+      [
+        "1x647999998"
+      ],
+      [
+        "1x647999999"
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x-647999997"
+      ],
+      [
+        "2x647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x-647999997"
+      ],
+      [
+        "3x647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ],
+      [
+        "4x-647999999"
+      ],
+      [
+        "4x-647999998"
+      ],
+      [
+        "4x-647999997"
+      ],
+      [
+        "4x647999997"
+      ],
+      [
+        "4x647999998"
+      ],
+      [
+        "4x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/all_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/all_out.test    2013-12-08 21:37:33 +0900 (c2e0b2b)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "4x647999997", "1x-647999997")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_out.expected (+51 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_out.expected    2013-12-08 21:37:33 +0900 (5669dca)
@@ -0,0 +1,51 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999997", "2x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        10
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_out.test    2013-12-08 21:37:33 +0900 (09ea2e3)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999997", "2x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_west_out.expected (+57 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_west_out.expected    2013-12-08 21:37:33 +0900 (3b1a750)
@@ -0,0 +1,57 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999997", "2x-647999997")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        12
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x-647999997"
+      ],
+      [
+        "2x647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x-647999997"
+      ],
+      [
+        "3x647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/east_west_out.test    2013-12-08 21:37:33 +0900 (cc0bc22)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999997", "2x-647999997")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_east_out.expected (+66 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_east_out.expected    2013-12-08 21:37:33 +0900 (cf2bd33)
@@ -0,0 +1,66 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "4x647999997", "2x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        15
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ],
+      [
+        "4x-647999999"
+      ],
+      [
+        "4x-647999998"
+      ],
+      [
+        "4x647999997"
+      ],
+      [
+        "4x647999998"
+      ],
+      [
+        "4x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_east_out.test    2013-12-08 21:37:33 +0900 (ffa7657)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "4x647999997", "2x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_out.expected (+57 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_out.expected    2013-12-08 21:37:33 +0900 (5c3cdb7)
@@ -0,0 +1,57 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "4x647999998", "2x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        12
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ],
+      [
+        "4x-647999999"
+      ],
+      [
+        "4x-647999998"
+      ],
+      [
+        "4x647999998"
+      ],
+      [
+        "4x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_out.test    2013-12-08 21:37:33 +0900 (e2714f7)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "4x647999998", "2x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_south_out.expected (+69 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_south_out.expected    2013-12-08 21:37:33 +0900 (4b311f3)
@@ -0,0 +1,69 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "4x647999998", "1x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        16
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "1x-647999999"
+      ],
+      [
+        "1x-647999998"
+      ],
+      [
+        "1x647999998"
+      ],
+      [
+        "1x647999999"
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ],
+      [
+        "4x-647999999"
+      ],
+      [
+        "4x-647999998"
+      ],
+      [
+        "4x647999998"
+      ],
+      [
+        "4x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_south_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_south_out.test    2013-12-08 21:37:33 +0900 (1ebdd1b)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "4x647999998", "1x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_west_out.expected (+66 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_west_out.expected    2013-12-08 21:37:33 +0900 (9b37d78)
@@ -0,0 +1,66 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "4x647999998", "2x-647999997")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        15
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x-647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x-647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ],
+      [
+        "4x-647999999"
+      ],
+      [
+        "4x-647999998"
+      ],
+      [
+        "4x-647999997"
+      ],
+      [
+        "4x647999998"
+      ],
+      [
+        "4x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/north_west_out.test    2013-12-08 21:37:33 +0900 (ddbfcf7)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "4x647999998", "2x-647999997")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/same_as_mesh.expected (+45 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/same_as_mesh.expected    2013-12-08 21:37:33 +0900 (17e086d)
@@ -0,0 +1,45 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999998", "2x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        8
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/same_as_mesh.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/same_as_mesh.test    2013-12-08 21:37:33 +0900 (b791792)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999998", "2x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_east_out.expected (+66 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_east_out.expected    2013-12-08 21:37:33 +0900 (da94370)
@@ -0,0 +1,66 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999997", "1x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        15
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "1x-647999999"
+      ],
+      [
+        "1x-647999998"
+      ],
+      [
+        "1x647999997"
+      ],
+      [
+        "1x647999998"
+      ],
+      [
+        "1x647999999"
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_east_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_east_out.test    2013-12-08 21:37:33 +0900 (35a27e3)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999997", "1x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_out.expected (+57 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_out.expected    2013-12-08 21:37:33 +0900 (ed7656c)
@@ -0,0 +1,57 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999998", "1x-647999998")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        12
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "1x-647999999"
+      ],
+      [
+        "1x-647999998"
+      ],
+      [
+        "1x647999998"
+      ],
+      [
+        "1x647999999"
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_out.test    2013-12-08 21:37:33 +0900 (588c164)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999998", "1x-647999998")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_west_out.expected (+66 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_west_out.expected    2013-12-08 21:37:33 +0900 (074819a)
@@ -0,0 +1,66 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999998", "1x-647999997")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        15
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "1x-647999999"
+      ],
+      [
+        "1x-647999998"
+      ],
+      [
+        "1x-647999997"
+      ],
+      [
+        "1x647999998"
+      ],
+      [
+        "1x647999999"
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x-647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x-647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/south_west_out.test    2013-12-08 21:37:33 +0900 (8e53c99)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999998", "1x-647999997")'

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/west_out.expected (+51 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/west_out.expected    2013-12-08 21:37:33 +0900 (f8d9be0)
@@ -0,0 +1,51 @@
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1   --filter 'geo_in_rectangle(point, "3x647999998", "2x-647999997")'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        10
+      ],
+      [
+        [
+          "point",
+          "WGS84GeoPoint"
+        ]
+      ],
+      [
+        "2x-647999999"
+      ],
+      [
+        "2x-647999998"
+      ],
+      [
+        "2x-647999997"
+      ],
+      [
+        "2x647999998"
+      ],
+      [
+        "2x647999999"
+      ],
+      [
+        "3x-647999999"
+      ],
+      [
+        "3x-647999998"
+      ],
+      [
+        "3x-647999997"
+      ],
+      [
+        "3x647999998"
+      ],
+      [
+        "3x647999999"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/west_out.test (+4 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/filter/geo_in_rectangle/north/around_180/use_index/west_out.test    2013-12-08 21:37:33 +0900 (71926c9)
@@ -0,0 +1,4 @@
+#@include fixture/geo/in_rectangle/north/around_180.grn
+
+select LandMarks --sortby '_id' --output_columns 'point' --limit -1 \
+  --filter 'geo_in_rectangle(point, "3x647999998", "2x-647999997")'
-------------- next part --------------
HTML����������������������������...
下载 



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