null+****@clear*****
null+****@clear*****
2011年 11月 13日 (日) 20:31:50 JST
Kouhei Sutou 2011-11-13 11:31:50 +0000 (Sun, 13 Nov 2011) New Revision: 77fc55a1a5d596830785c20d8ea6f5c59ed6aec9 Log: [test][geo] add tests for geo_in_rectangle. Added files: test/unit/core/test-geo-in-rectangle-border.c test/unit/fixtures/geo/Makefile.am test/unit/fixtures/geo/data.grn test/unit/fixtures/geo/ddl.grn test/unit/fixtures/geo/generate-data.rb Modified files: configure.ac test/unit/core/Makefile.am test/unit/fixtures/Makefile.am Modified: configure.ac (+1 -0) =================================================================== --- configure.ac 2011-11-13 07:35:29 +0000 (377ff8f) +++ configure.ac 2011-11-13 11:31:50 +0000 (3b782de) @@ -214,6 +214,7 @@ AC_CONFIG_FILES([ test/unit/fixtures/stress/Makefile test/unit/fixtures/performance/Makefile test/unit/fixtures/plugins/Makefile + test/unit/fixtures/geo/Makefile test/unit/fixtures/story/Makefile test/unit/fixtures/story/taiyaki/Makefile test/unit/fixtures/story/rurema/Makefile Modified: test/unit/core/Makefile.am (+2 -0) =================================================================== --- test/unit/core/Makefile.am 2011-11-13 07:35:29 +0000 (f1bfcf2) +++ test/unit/core/Makefile.am 2011-11-13 11:31:50 +0000 (1b3ed0e) @@ -61,6 +61,7 @@ noinst_LTLIBRARIES = \ test-command-truncate.la \ test-geo.la \ test-geo-in-rectangle.la \ + test-geo-in-rectangle-border.la \ test-accessor.la \ test-object.la endif @@ -144,5 +145,6 @@ test_command_dump_la_SOURCES = test-command-dump.c test_command_truncate_la_SOURCES = test-command-truncate.c test_geo_la_SOURCES = test-geo.c test_geo_in_rectangle_la_SOURCES = test-geo-in-rectangle.c +test_geo_in_rectangle_border_la_SOURCES = test-geo-in-rectangle-border.c test_accessor_la_SOURCES = test-accessor.c test_object_la_SOURCES = test-object.c Added: test/unit/core/test-geo-in-rectangle-border.c (+360 -0) 100644 =================================================================== --- /dev/null +++ test/unit/core/test-geo-in-rectangle-border.c 2011-11-13 11:31:50 +0000 (1cd3990) @@ -0,0 +1,360 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2011 Kouhei Sutou <kou****@clear*****> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include <gcutter.h> +#include <glib/gstdio.h> + +#include "../lib/grn-assertions.h" + +#include <str.h> +#include <geo.h> + +#define get(name) grn_ctx_get(context, name, strlen(name)) + +void data_cursor(void); +void test_cursor(gconstpointer data); + +static gchar *tmp_directory; + +static grn_ctx *context; +static grn_obj *database, *points, *short_degree_column; +static grn_obj *location_index_column, *result; + +void +cut_startup(void) +{ + tmp_directory = g_build_filename(grn_test_get_tmp_dir(), + "geo-in-rectangle-border", + NULL); +} + +void +cut_shutdown(void) +{ + g_free(tmp_directory); +} + +static void +remove_tmp_directory(void) +{ + cut_remove_path(tmp_directory, NULL); +} + +static void +load_data(void) +{ + assert_send_commands(cut_get_fixture_data_string("ddl.grn", NULL)); + assert_send_command(cut_get_fixture_data_string("data.grn", NULL)); +} + +void +cut_setup(void) +{ + const gchar *database_path; + + cut_set_fixture_data_dir(grn_test_get_base_dir(), + "fixtures", + "geo", + NULL); + + remove_tmp_directory(); + g_mkdir_with_parents(tmp_directory, 0700); + + context = g_new0(grn_ctx, 1); + grn_ctx_init(context, 0); + + database_path = cut_build_path(tmp_directory, "database.groonga", NULL); + database = grn_db_create(context, database_path, NULL); + + load_data(); + + points = get("Points"); + short_degree_column = get("Points.short_degree"); + location_index_column = get("Locations.point"); + + result = grn_table_create(context, + NULL, 0, + NULL, + GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, + points, NULL); +} + +void +cut_teardown(void) +{ + grn_obj_unlink(context, result); + grn_obj_unlink(context, location_index_column); + grn_obj_unlink(context, short_degree_column); + grn_obj_unlink(context, points); + grn_obj_close(context, database); + grn_ctx_fin(context); + g_free(context); + + remove_tmp_directory(); +} + +#define ADD_DATA(label, expected, top, left, bottom, right) \ + gcut_add_datum(label, \ + "expected", G_TYPE_POINTER, expected, gcut_list_string_free, \ + "top", G_TYPE_INT, top, \ + "left", G_TYPE_INT, left, \ + "bottom", G_TYPE_INT, bottom, \ + "right", G_TYPE_INT, right, \ + NULL) + +static void +data_cursor_all_bottom_left(void) +{ + ADD_DATA("all - bottom left - bottom left", + gcut_list_string_new( + "(03,03)", "(03,04)", "(03,05)", "(03,06)", "(03,07)", "(03,08)", + "(04,03)", "(04,04)", "(04,05)", "(04,06)", "(04,07)", "(04,08)", + "(05,03)", "(05,04)", "(05,05)", "(05,06)", "(05,07)", "(05,08)", + "(06,03)", "(06,04)", "(06,05)", "(06,06)", "(06,07)", "(06,08)", + "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", + "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", + NULL), + 8, 3, + 3, 8); + + ADD_DATA("all - bottom left - top left", + gcut_list_string_new( + "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", + "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", + NULL), + 8, 3, + 7, 8); + + ADD_DATA("all - bottom left - bottom right", + gcut_list_string_new("(03,07)", "(03,08)", + "(04,07)", "(04,08)", + "(05,07)", "(05,08)", + "(06,07)", "(06,08)", + "(07,07)", "(07,08)", + "(08,07)", "(08,08)", + NULL), + 8, 7, + 3, 8); +} + +static void +data_cursor_all_top_left(void) +{ + ADD_DATA("all - top left - top left", + gcut_list_string_new( + "(07,03)", "(07,04)", "(07,05)", "(07,06)", "(07,07)", "(07,08)", + "(08,03)", "(08,04)", "(08,05)", "(08,06)", "(08,07)", "(08,08)", + "(09,03)", "(09,04)", "(09,05)", "(09,06)", "(09,07)", "(09,08)", + "(10,03)", "(10,04)", "(10,05)", "(10,06)", "(10,07)", "(10,08)", + "(11,03)", "(11,04)", "(11,05)", "(11,06)", "(11,07)", "(11,08)", + "(12,03)", "(12,04)", "(12,05)", "(12,06)", "(12,07)", "(12,08)", + NULL), + 12, 3, + 7, 8); + + ADD_DATA("all - top left - top right", + gcut_list_string_new("(07,07)", "(07,08)", + "(08,07)", "(08,08)", + "(09,07)", "(09,08)", + "(10,07)", "(10,08)", + "(11,07)", "(11,08)", + "(12,07)", "(12,08)", + NULL), + 12, 7, + 7, 8); +} + +static void +data_cursor_all_bottom_right(void) +{ + ADD_DATA("all - bottom right - bottom right", + gcut_list_string_new( + "(03,07)", "(03,08)", "(03,09)", "(03,10)", "(03,11)", "(03,12)", + "(04,07)", "(04,08)", "(04,09)", "(04,10)", "(04,11)", "(04,12)", + "(05,07)", "(05,08)", "(05,09)", "(05,10)", "(05,11)", "(05,12)", + "(06,07)", "(06,08)", "(06,09)", "(06,10)", "(06,11)", "(06,12)", + "(07,07)", "(07,08)", "(07,09)", "(07,10)", "(07,11)", "(07,12)", + "(08,07)", "(08,08)", "(08,09)", "(08,10)", "(08,11)", "(08,12)", + NULL), + 8, 7, + 3, 12); + + ADD_DATA("all - bottom right - top right", + gcut_list_string_new( + "(07,07)", "(07,08)", "(07,09)", "(07,10)", "(07,11)", "(07,12)", + "(08,07)", "(08,08)", "(08,09)", "(08,10)", "(08,11)", "(08,12)", + NULL), + 8, 7, + 7, 12); +} + +static void +data_cursor_all_top_right(void) +{ + ADD_DATA("all - bottom right - top right", + gcut_list_string_new( + "(07,07)", "(07,08)", "(07,09)", "(07,10)", "(07,11)", "(07,12)", + "(08,07)", "(08,08)", "(08,09)", "(08,10)", "(08,11)", "(08,12)", + "(09,07)", "(09,08)", "(09,09)", "(09,10)", "(09,11)", "(09,12)", + "(10,07)", "(10,08)", "(10,09)", "(10,10)", "(10,11)", "(10,12)", + "(11,07)", "(11,08)", "(11,09)", "(11,10)", "(11,11)", "(11,12)", + "(12,07)", "(12,08)", "(12,09)", "(12,10)", "(12,11)", "(12,12)", + NULL), + 12, 7, + 7, 12); +} + +static void +data_cursor_all(void) +{ + ADD_DATA("all - minimum", + gcut_list_string_new("(07,07)", "(07,08)", + "(08,07)", "(08,08)", + NULL), + 8, 7, + 7, 8); + + data_cursor_all_bottom_left(); + data_cursor_all_top_left(); + data_cursor_all_bottom_right(); + data_cursor_all_top_right(); +} + +static void +data_cursor_bottom(void) +{ + ADD_DATA("bottom - minimum", + gcut_list_string_new("(03,07)", "(03,08)", + "(04,07)", "(04,08)", + NULL), + 4, 7, + 3, 8); + + ADD_DATA("bottom - left - left", + gcut_list_string_new( + "(03,03)", "(03,04)", "(03,05)", "(03,06)", "(03,07)", "(03,08)", + "(04,03)", "(04,04)", "(04,05)", "(04,06)", "(04,07)", "(04,08)", + NULL), + 4, 3, + 3, 8); + + ADD_DATA("bottom - right - right", + gcut_list_string_new( + "(03,07)", "(03,08)", "(03,09)", "(03,10)", "(03,11)", "(03,12)", + "(04,07)", "(04,08)", "(04,09)", "(04,10)", "(04,11)", "(04,12)", + NULL), + 4, 7, + 3, 12); +} + +static void +data_cursor_top(void) +{ + ADD_DATA("top - minimum", + gcut_list_string_new("(11,07)", "(11,08)", + "(12,07)", "(12,08)", + NULL), + 12, 7, + 11, 8); + + ADD_DATA("top - left - left", + gcut_list_string_new( + "(11,03)", "(11,04)", "(11,05)", "(11,06)", "(11,07)", "(11,08)", + "(12,03)", "(12,04)", "(12,05)", "(12,06)", "(12,07)", "(12,08)", + NULL), + 12, 3, + 11, 8); + + ADD_DATA("bottom - right - right", + gcut_list_string_new( + "(11,07)", "(11,08)", "(11,09)", "(11,10)", "(11,11)", "(11,12)", + "(12,07)", "(12,08)", "(12,09)", "(12,10)", "(12,11)", "(12,12)", + NULL), + 12, 7, + 11, 12); +} + +void +data_cursor(void) +{ + data_cursor_all(); + data_cursor_bottom(); + data_cursor_top(); +} + +#undef ADD_DATA + +static void +set_geo_point(grn_obj *geo_point, + gint relative_latitude, gint relative_longitude) +{ + gint latitude, longitude; + gint base_latitude = (45 * 60 * 60 + 0 * 60) * 1000; + gint base_longitude = (90 * 60 * 60 + 0 * 60) * 1000; + + GRN_WGS84_GEO_POINT_INIT(geo_point, 0); + latitude = base_latitude + relative_latitude; + longitude = base_longitude + relative_longitude; + GRN_GEO_POINT_SET(context, geo_point, latitude, longitude); +} + +void +test_cursor(gconstpointer data) +{ + GList *expected, *records = NULL; + gint offset = 0; + gint limit = -1; + grn_obj top_left, bottom_right; + grn_obj *geo_cursor; + grn_posting *posting; + grn_obj short_degree; + + set_geo_point(&top_left, + gcut_data_get_int(data, "top"), + gcut_data_get_int(data, "left")); + set_geo_point(&bottom_right, + gcut_data_get_int(data, "bottom"), + gcut_data_get_int(data, "right")); + geo_cursor = grn_geo_cursor_open_in_rectangle(context, + location_index_column, + &top_left, + &bottom_right, + offset, limit); + grn_obj_unlink(context, &top_left); + grn_obj_unlink(context, &bottom_right); + + GRN_TEXT_INIT(&short_degree, 0); + while ((posting = grn_geo_cursor_next(context, geo_cursor))) { + grn_id point_id = posting->rid; + + GRN_BULK_REWIND(&short_degree); + grn_obj_get_value(context, short_degree_column, point_id, &short_degree); + records = g_list_append(records, + g_strndup(GRN_TEXT_VALUE(&short_degree), + GRN_TEXT_LEN(&short_degree))); + } + grn_obj_unlink(context, &short_degree); + grn_obj_unlink(context, geo_cursor); + + records = g_list_sort(records, (GCompareFunc)strcmp); + gcut_take_list(records, g_free); + + expected = (GList *)gcut_data_get_pointer(data, "expected"); + gcut_assert_equal_list_string(expected, records); +} + Modified: test/unit/fixtures/Makefile.am (+1 -0) =================================================================== --- test/unit/fixtures/Makefile.am 2011-11-13 07:35:29 +0000 (c7446a7) +++ test/unit/fixtures/Makefile.am 2011-11-13 11:31:50 +0000 (3655b46) @@ -3,6 +3,7 @@ SUBDIRS = \ performance \ inverted-index \ plugins \ + geo \ story if WITH_CUTTER Added: test/unit/fixtures/geo/Makefile.am (+6 -0) 100644 =================================================================== --- /dev/null +++ test/unit/fixtures/geo/Makefile.am 2011-11-13 11:31:50 +0000 (8c38467) @@ -0,0 +1,6 @@ +EXTRA_DIST = \ + ddl.grn \ + data.grn \ + generate-data.rb + + Added: test/unit/fixtures/geo/data.grn (+259 -0) 100644 =================================================================== --- /dev/null +++ test/unit/fixtures/geo/data.grn 2011-11-13 11:31:50 +0000 (2fd7a01) @@ -0,0 +1,259 @@ +load --table Points +[ +["_key", "short_key", "degree", "short_degree", "location"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 0),(90, 0, 0, 0))","(00,00)","162000000x324000000"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 0),(90, 0, 0, 1))","(00,01)","162000000x324000001"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 0),(90, 0, 0, 2))","(00,02)","162000000x324000002"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 0),(90, 0, 0, 3))","(00,03)","162000000x324000003"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 0),(90, 0, 0, 4))","(00,04)","162000000x324000004"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 0),(90, 0, 0, 5))","(00,05)","162000000x324000005"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 0),(90, 0, 0, 6))","(00,06)","162000000x324000006"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 0),(90, 0, 0, 7))","(00,07)","162000000x324000007"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 0),(90, 0, 0, 8))","(00,08)","162000000x324000008"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 0),(90, 0, 0, 9))","(00,09)","162000000x324000009"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 0),(90, 0, 0, 10))","(00,10)","162000000x324000010"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 0),(90, 0, 0, 11))","(00,11)","162000000x324000011"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 0),(90, 0, 0, 12))","(00,12)","162000000x324000012"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 0),(90, 0, 0, 13))","(00,13)","162000000x324000013"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 0),(90, 0, 0, 14))","(00,14)","162000000x324000014"], +["0b00001001101001111110110010000000\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 0),(90, 0, 0, 15))","(00,15)","162000000x324000015"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 1),(90, 0, 0, 0))","(01,00)","162000001x324000000"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 1),(90, 0, 0, 1))","(01,01)","162000001x324000001"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 1),(90, 0, 0, 2))","(01,02)","162000001x324000002"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 1),(90, 0, 0, 3))","(01,03)","162000001x324000003"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 1),(90, 0, 0, 4))","(01,04)","162000001x324000004"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 1),(90, 0, 0, 5))","(01,05)","162000001x324000005"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 1),(90, 0, 0, 6))","(01,06)","162000001x324000006"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 1),(90, 0, 0, 7))","(01,07)","162000001x324000007"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 1),(90, 0, 0, 8))","(01,08)","162000001x324000008"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 1),(90, 0, 0, 9))","(01,09)","162000001x324000009"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 1),(90, 0, 0, 10))","(01,10)","162000001x324000010"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 1),(90, 0, 0, 11))","(01,11)","162000001x324000011"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 1),(90, 0, 0, 12))","(01,12)","162000001x324000012"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 1),(90, 0, 0, 13))","(01,13)","162000001x324000013"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 1),(90, 0, 0, 14))","(01,14)","162000001x324000014"], +["0b00001001101001111110110010000001\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 1),(90, 0, 0, 15))","(01,15)","162000001x324000015"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 2),(90, 0, 0, 0))","(02,00)","162000002x324000000"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 2),(90, 0, 0, 1))","(02,01)","162000002x324000001"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 2),(90, 0, 0, 2))","(02,02)","162000002x324000002"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 2),(90, 0, 0, 3))","(02,03)","162000002x324000003"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 2),(90, 0, 0, 4))","(02,04)","162000002x324000004"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 2),(90, 0, 0, 5))","(02,05)","162000002x324000005"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 2),(90, 0, 0, 6))","(02,06)","162000002x324000006"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 2),(90, 0, 0, 7))","(02,07)","162000002x324000007"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 2),(90, 0, 0, 8))","(02,08)","162000002x324000008"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 2),(90, 0, 0, 9))","(02,09)","162000002x324000009"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 2),(90, 0, 0, 10))","(02,10)","162000002x324000010"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 2),(90, 0, 0, 11))","(02,11)","162000002x324000011"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 2),(90, 0, 0, 12))","(02,12)","162000002x324000012"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 2),(90, 0, 0, 13))","(02,13)","162000002x324000013"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 2),(90, 0, 0, 14))","(02,14)","162000002x324000014"], +["0b00001001101001111110110010000010\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 2),(90, 0, 0, 15))","(02,15)","162000002x324000015"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 3),(90, 0, 0, 0))","(03,00)","162000003x324000000"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 3),(90, 0, 0, 1))","(03,01)","162000003x324000001"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 3),(90, 0, 0, 2))","(03,02)","162000003x324000002"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 3),(90, 0, 0, 3))","(03,03)","162000003x324000003"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 3),(90, 0, 0, 4))","(03,04)","162000003x324000004"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 3),(90, 0, 0, 5))","(03,05)","162000003x324000005"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 3),(90, 0, 0, 6))","(03,06)","162000003x324000006"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 3),(90, 0, 0, 7))","(03,07)","162000003x324000007"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 3),(90, 0, 0, 8))","(03,08)","162000003x324000008"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 3),(90, 0, 0, 9))","(03,09)","162000003x324000009"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 3),(90, 0, 0, 10))","(03,10)","162000003x324000010"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 3),(90, 0, 0, 11))","(03,11)","162000003x324000011"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 3),(90, 0, 0, 12))","(03,12)","162000003x324000012"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 3),(90, 0, 0, 13))","(03,13)","162000003x324000013"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 3),(90, 0, 0, 14))","(03,14)","162000003x324000014"], +["0b00001001101001111110110010000011\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 3),(90, 0, 0, 15))","(03,15)","162000003x324000015"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 4),(90, 0, 0, 0))","(04,00)","162000004x324000000"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 4),(90, 0, 0, 1))","(04,01)","162000004x324000001"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 4),(90, 0, 0, 2))","(04,02)","162000004x324000002"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 4),(90, 0, 0, 3))","(04,03)","162000004x324000003"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 4),(90, 0, 0, 4))","(04,04)","162000004x324000004"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 4),(90, 0, 0, 5))","(04,05)","162000004x324000005"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 4),(90, 0, 0, 6))","(04,06)","162000004x324000006"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 4),(90, 0, 0, 7))","(04,07)","162000004x324000007"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 4),(90, 0, 0, 8))","(04,08)","162000004x324000008"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 4),(90, 0, 0, 9))","(04,09)","162000004x324000009"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 4),(90, 0, 0, 10))","(04,10)","162000004x324000010"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 4),(90, 0, 0, 11))","(04,11)","162000004x324000011"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 4),(90, 0, 0, 12))","(04,12)","162000004x324000012"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 4),(90, 0, 0, 13))","(04,13)","162000004x324000013"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 4),(90, 0, 0, 14))","(04,14)","162000004x324000014"], +["0b00001001101001111110110010000100\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 4),(90, 0, 0, 15))","(04,15)","162000004x324000015"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 5),(90, 0, 0, 0))","(05,00)","162000005x324000000"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 5),(90, 0, 0, 1))","(05,01)","162000005x324000001"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 5),(90, 0, 0, 2))","(05,02)","162000005x324000002"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 5),(90, 0, 0, 3))","(05,03)","162000005x324000003"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 5),(90, 0, 0, 4))","(05,04)","162000005x324000004"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 5),(90, 0, 0, 5))","(05,05)","162000005x324000005"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 5),(90, 0, 0, 6))","(05,06)","162000005x324000006"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 5),(90, 0, 0, 7))","(05,07)","162000005x324000007"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 5),(90, 0, 0, 8))","(05,08)","162000005x324000008"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 5),(90, 0, 0, 9))","(05,09)","162000005x324000009"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 5),(90, 0, 0, 10))","(05,10)","162000005x324000010"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 5),(90, 0, 0, 11))","(05,11)","162000005x324000011"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 5),(90, 0, 0, 12))","(05,12)","162000005x324000012"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 5),(90, 0, 0, 13))","(05,13)","162000005x324000013"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 5),(90, 0, 0, 14))","(05,14)","162000005x324000014"], +["0b00001001101001111110110010000101\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 5),(90, 0, 0, 15))","(05,15)","162000005x324000015"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 6),(90, 0, 0, 0))","(06,00)","162000006x324000000"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 6),(90, 0, 0, 1))","(06,01)","162000006x324000001"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 6),(90, 0, 0, 2))","(06,02)","162000006x324000002"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 6),(90, 0, 0, 3))","(06,03)","162000006x324000003"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 6),(90, 0, 0, 4))","(06,04)","162000006x324000004"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 6),(90, 0, 0, 5))","(06,05)","162000006x324000005"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 6),(90, 0, 0, 6))","(06,06)","162000006x324000006"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 6),(90, 0, 0, 7))","(06,07)","162000006x324000007"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 6),(90, 0, 0, 8))","(06,08)","162000006x324000008"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 6),(90, 0, 0, 9))","(06,09)","162000006x324000009"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 6),(90, 0, 0, 10))","(06,10)","162000006x324000010"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 6),(90, 0, 0, 11))","(06,11)","162000006x324000011"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 6),(90, 0, 0, 12))","(06,12)","162000006x324000012"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 6),(90, 0, 0, 13))","(06,13)","162000006x324000013"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 6),(90, 0, 0, 14))","(06,14)","162000006x324000014"], +["0b00001001101001111110110010000110\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 6),(90, 0, 0, 15))","(06,15)","162000006x324000015"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 7),(90, 0, 0, 0))","(07,00)","162000007x324000000"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 7),(90, 0, 0, 1))","(07,01)","162000007x324000001"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 7),(90, 0, 0, 2))","(07,02)","162000007x324000002"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 7),(90, 0, 0, 3))","(07,03)","162000007x324000003"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 7),(90, 0, 0, 4))","(07,04)","162000007x324000004"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 7),(90, 0, 0, 5))","(07,05)","162000007x324000005"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 7),(90, 0, 0, 6))","(07,06)","162000007x324000006"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 7),(90, 0, 0, 7))","(07,07)","162000007x324000007"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 7),(90, 0, 0, 8))","(07,08)","162000007x324000008"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 7),(90, 0, 0, 9))","(07,09)","162000007x324000009"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 7),(90, 0, 0, 10))","(07,10)","162000007x324000010"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 7),(90, 0, 0, 11))","(07,11)","162000007x324000011"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 7),(90, 0, 0, 12))","(07,12)","162000007x324000012"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 7),(90, 0, 0, 13))","(07,13)","162000007x324000013"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 7),(90, 0, 0, 14))","(07,14)","162000007x324000014"], +["0b00001001101001111110110010000111\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 7),(90, 0, 0, 15))","(07,15)","162000007x324000015"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 8),(90, 0, 0, 0))","(08,00)","162000008x324000000"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 8),(90, 0, 0, 1))","(08,01)","162000008x324000001"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 8),(90, 0, 0, 2))","(08,02)","162000008x324000002"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 8),(90, 0, 0, 3))","(08,03)","162000008x324000003"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 8),(90, 0, 0, 4))","(08,04)","162000008x324000004"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 8),(90, 0, 0, 5))","(08,05)","162000008x324000005"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 8),(90, 0, 0, 6))","(08,06)","162000008x324000006"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 8),(90, 0, 0, 7))","(08,07)","162000008x324000007"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 8),(90, 0, 0, 8))","(08,08)","162000008x324000008"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 8),(90, 0, 0, 9))","(08,09)","162000008x324000009"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 8),(90, 0, 0, 10))","(08,10)","162000008x324000010"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 8),(90, 0, 0, 11))","(08,11)","162000008x324000011"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 8),(90, 0, 0, 12))","(08,12)","162000008x324000012"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 8),(90, 0, 0, 13))","(08,13)","162000008x324000013"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 8),(90, 0, 0, 14))","(08,14)","162000008x324000014"], +["0b00001001101001111110110010001000\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 8),(90, 0, 0, 15))","(08,15)","162000008x324000015"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 9),(90, 0, 0, 0))","(09,00)","162000009x324000000"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 9),(90, 0, 0, 1))","(09,01)","162000009x324000001"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 9),(90, 0, 0, 2))","(09,02)","162000009x324000002"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 9),(90, 0, 0, 3))","(09,03)","162000009x324000003"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 9),(90, 0, 0, 4))","(09,04)","162000009x324000004"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 9),(90, 0, 0, 5))","(09,05)","162000009x324000005"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 9),(90, 0, 0, 6))","(09,06)","162000009x324000006"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 9),(90, 0, 0, 7))","(09,07)","162000009x324000007"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 9),(90, 0, 0, 8))","(09,08)","162000009x324000008"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 9),(90, 0, 0, 9))","(09,09)","162000009x324000009"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 9),(90, 0, 0, 10))","(09,10)","162000009x324000010"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 9),(90, 0, 0, 11))","(09,11)","162000009x324000011"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 9),(90, 0, 0, 12))","(09,12)","162000009x324000012"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 9),(90, 0, 0, 13))","(09,13)","162000009x324000013"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 9),(90, 0, 0, 14))","(09,14)","162000009x324000014"], +["0b00001001101001111110110010001001\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 9),(90, 0, 0, 15))","(09,15)","162000009x324000015"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 10),(90, 0, 0, 0))","(10,00)","162000010x324000000"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 10),(90, 0, 0, 1))","(10,01)","162000010x324000001"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 10),(90, 0, 0, 2))","(10,02)","162000010x324000002"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 10),(90, 0, 0, 3))","(10,03)","162000010x324000003"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 10),(90, 0, 0, 4))","(10,04)","162000010x324000004"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 10),(90, 0, 0, 5))","(10,05)","162000010x324000005"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 10),(90, 0, 0, 6))","(10,06)","162000010x324000006"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 10),(90, 0, 0, 7))","(10,07)","162000010x324000007"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 10),(90, 0, 0, 8))","(10,08)","162000010x324000008"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 10),(90, 0, 0, 9))","(10,09)","162000010x324000009"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 10),(90, 0, 0, 10))","(10,10)","162000010x324000010"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 10),(90, 0, 0, 11))","(10,11)","162000010x324000011"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 10),(90, 0, 0, 12))","(10,12)","162000010x324000012"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 10),(90, 0, 0, 13))","(10,13)","162000010x324000013"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 10),(90, 0, 0, 14))","(10,14)","162000010x324000014"], +["0b00001001101001111110110010001010\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 10),(90, 0, 0, 15))","(10,15)","162000010x324000015"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 11),(90, 0, 0, 0))","(11,00)","162000011x324000000"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 11),(90, 0, 0, 1))","(11,01)","162000011x324000001"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 11),(90, 0, 0, 2))","(11,02)","162000011x324000002"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 11),(90, 0, 0, 3))","(11,03)","162000011x324000003"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 11),(90, 0, 0, 4))","(11,04)","162000011x324000004"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 11),(90, 0, 0, 5))","(11,05)","162000011x324000005"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 11),(90, 0, 0, 6))","(11,06)","162000011x324000006"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 11),(90, 0, 0, 7))","(11,07)","162000011x324000007"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 11),(90, 0, 0, 8))","(11,08)","162000011x324000008"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 11),(90, 0, 0, 9))","(11,09)","162000011x324000009"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 11),(90, 0, 0, 10))","(11,10)","162000011x324000010"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 11),(90, 0, 0, 11))","(11,11)","162000011x324000011"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 11),(90, 0, 0, 12))","(11,12)","162000011x324000012"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 11),(90, 0, 0, 13))","(11,13)","162000011x324000013"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 11),(90, 0, 0, 14))","(11,14)","162000011x324000014"], +["0b00001001101001111110110010001011\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 11),(90, 0, 0, 15))","(11,15)","162000011x324000015"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 12),(90, 0, 0, 0))","(12,00)","162000012x324000000"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 12),(90, 0, 0, 1))","(12,01)","162000012x324000001"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 12),(90, 0, 0, 2))","(12,02)","162000012x324000002"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 12),(90, 0, 0, 3))","(12,03)","162000012x324000003"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 12),(90, 0, 0, 4))","(12,04)","162000012x324000004"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 12),(90, 0, 0, 5))","(12,05)","162000012x324000005"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 12),(90, 0, 0, 6))","(12,06)","162000012x324000006"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 12),(90, 0, 0, 7))","(12,07)","162000012x324000007"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 12),(90, 0, 0, 8))","(12,08)","162000012x324000008"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 12),(90, 0, 0, 9))","(12,09)","162000012x324000009"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 12),(90, 0, 0, 10))","(12,10)","162000012x324000010"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 12),(90, 0, 0, 11))","(12,11)","162000012x324000011"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 12),(90, 0, 0, 12))","(12,12)","162000012x324000012"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 12),(90, 0, 0, 13))","(12,13)","162000012x324000013"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 12),(90, 0, 0, 14))","(12,14)","162000012x324000014"], +["0b00001001101001111110110010001100\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 12),(90, 0, 0, 15))","(12,15)","162000012x324000015"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 13),(90, 0, 0, 0))","(13,00)","162000013x324000000"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 13),(90, 0, 0, 1))","(13,01)","162000013x324000001"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 13),(90, 0, 0, 2))","(13,02)","162000013x324000002"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 13),(90, 0, 0, 3))","(13,03)","162000013x324000003"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 13),(90, 0, 0, 4))","(13,04)","162000013x324000004"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 13),(90, 0, 0, 5))","(13,05)","162000013x324000005"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 13),(90, 0, 0, 6))","(13,06)","162000013x324000006"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 13),(90, 0, 0, 7))","(13,07)","162000013x324000007"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 13),(90, 0, 0, 8))","(13,08)","162000013x324000008"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 13),(90, 0, 0, 9))","(13,09)","162000013x324000009"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 13),(90, 0, 0, 10))","(13,10)","162000013x324000010"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 13),(90, 0, 0, 11))","(13,11)","162000013x324000011"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 13),(90, 0, 0, 12))","(13,12)","162000013x324000012"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 13),(90, 0, 0, 13))","(13,13)","162000013x324000013"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 13),(90, 0, 0, 14))","(13,14)","162000013x324000014"], +["0b00001001101001111110110010001101\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 13),(90, 0, 0, 15))","(13,15)","162000013x324000015"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 14),(90, 0, 0, 0))","(14,00)","162000014x324000000"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 14),(90, 0, 0, 1))","(14,01)","162000014x324000001"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 14),(90, 0, 0, 2))","(14,02)","162000014x324000002"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 14),(90, 0, 0, 3))","(14,03)","162000014x324000003"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 14),(90, 0, 0, 4))","(14,04)","162000014x324000004"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 14),(90, 0, 0, 5))","(14,05)","162000014x324000005"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 14),(90, 0, 0, 6))","(14,06)","162000014x324000006"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 14),(90, 0, 0, 7))","(14,07)","162000014x324000007"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 14),(90, 0, 0, 8))","(14,08)","162000014x324000008"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 14),(90, 0, 0, 9))","(14,09)","162000014x324000009"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 14),(90, 0, 0, 10))","(14,10)","162000014x324000010"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 14),(90, 0, 0, 11))","(14,11)","162000014x324000011"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 14),(90, 0, 0, 12))","(14,12)","162000014x324000012"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 14),(90, 0, 0, 13))","(14,13)","162000014x324000013"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 14),(90, 0, 0, 14))","(14,14)","162000014x324000014"], +["0b00001001101001111110110010001110\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 14),(90, 0, 0, 15))","(14,15)","162000014x324000015"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000000","00000001","((45, 0, 0, 15),(90, 0, 0, 0))","(15,00)","162000015x324000000"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000001","00000001","((45, 0, 0, 15),(90, 0, 0, 1))","(15,01)","162000015x324000001"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000010","00000001","((45, 0, 0, 15),(90, 0, 0, 2))","(15,02)","162000015x324000002"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000011","00000001","((45, 0, 0, 15),(90, 0, 0, 3))","(15,03)","162000015x324000003"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000100","00000001","((45, 0, 0, 15),(90, 0, 0, 4))","(15,04)","162000015x324000004"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000101","00000001","((45, 0, 0, 15),(90, 0, 0, 5))","(15,05)","162000015x324000005"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000110","00000001","((45, 0, 0, 15),(90, 0, 0, 6))","(15,06)","162000015x324000006"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100000111","00000001","((45, 0, 0, 15),(90, 0, 0, 7))","(15,07)","162000015x324000007"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001000","00000001","((45, 0, 0, 15),(90, 0, 0, 8))","(15,08)","162000015x324000008"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001001","00000001","((45, 0, 0, 15),(90, 0, 0, 9))","(15,09)","162000015x324000009"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001010","00000001","((45, 0, 0, 15),(90, 0, 0, 10))","(15,10)","162000015x324000010"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001011","00000001","((45, 0, 0, 15),(90, 0, 0, 11))","(15,11)","162000015x324000011"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001100","00000001","((45, 0, 0, 15),(90, 0, 0, 12))","(15,12)","162000015x324000012"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001101","00000001","((45, 0, 0, 15),(90, 0, 0, 13))","(15,13)","162000015x324000013"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001110","00000001","((45, 0, 0, 15),(90, 0, 0, 14))","(15,14)","162000015x324000014"], +["0b00001001101001111110110010001111\n0b00010011010011111101100100001111","00000001","((45, 0, 0, 15),(90, 0, 0, 15))","(15,15)","162000015x324000015"], Added: test/unit/fixtures/geo/ddl.grn (+7 -0) 100644 =================================================================== --- /dev/null +++ test/unit/fixtures/geo/ddl.grn 2011-11-13 11:31:50 +0000 (f1f00ae) @@ -0,0 +1,7 @@ +table_create Points TABLE_HASH_KEY ShortText +column_create Points short_key COLUMN_SCALAR ShortText +column_create Points degree COLUMN_SCALAR ShortText +column_create Points short_degree COLUMN_SCALAR ShortText +column_create Points location COLUMN_SCALAR WGS84GeoPoint +table_create Locations TABLE_PAT_KEY WGS84GeoPoint +column_create Locations point COLUMN_INDEX Points location Added: test/unit/fixtures/geo/generate-data.rb (+67 -0) 100755 =================================================================== --- /dev/null +++ test/unit/fixtures/geo/generate-data.rb 2011-11-13 11:31:50 +0000 (5b0e3a6) @@ -0,0 +1,67 @@ +#!/usr/bin/env ruby + +seed_latitude = (45 * 60 * 60 + 0 * 60 + 0) * 1000 +seed_longitude = (90 * 60 * 60 + 0 * 60 + 0) * 1000 + +n_places = 32 +common_n_places = 28 + +rest_n_places = n_places - common_n_places + +seed_latitude_in_string = ("%0#{n_places}b" % seed_latitude) +seed_longitude_in_string = ("%0#{n_places}b" % seed_longitude) + +base_latitude_in_string = seed_latitude_in_string[0, common_n_places] +base_latitude_in_string += "0" * rest_n_places +base_longitude_in_string = seed_longitude_in_string[0, common_n_places] +base_longitude_in_string += "0" * rest_n_places + +base_latitude = base_latitude_in_string.to_i(2) +base_longitude = base_longitude_in_string.to_i(2) + +points = [] +max_variable_value = rest_n_places ** 2 +max_variable_value.times do |i| + latitude = base_latitude + i + max_variable_value.times do |j| + longitude = base_longitude + j + points << [latitude, longitude] + end +end + +def to_degree(point) + "(%d, %d, %d, %d)" % [(point / 1000 / 60 / 60), + (point / 1000 / 60) % 60, + (point / 1000) % 60, + (point % 1000)] +end + +puts("load --table Points") +puts("[") +puts("[\"_key\", \"short_key\", \"degree\", \"short_degree\", \"location\"],") +points.each do |latitude, longitude| + latitude_in_string = "%0#{n_places}b" % latitude + longitude_in_string = "%0#{n_places}b" % longitude + short_key = "" + rest_n_places.times do |i| + short_key << latitude_in_string[i] + short_key << longitude_in_string[i] + end + latitude_in_degree = to_degree(latitude) + longitude_in_degree = to_degree(longitude) + degree = "(#{latitude_in_degree},#{longitude_in_degree})" + short_degree_n_places = (Math.log10(max_variable_value) + 1).truncate + short_degree_format = "(%0#{short_degree_n_places}d," + + "%0#{short_degree_n_places}d)" + short_degree = short_degree_format % [latitude % max_variable_value, + longitude % max_variable_value] + + print("[") + print("\"0b#{latitude_in_string}\\n") + print("0b#{longitude_in_string}\",") + print("\"#{short_key}\",") + print("\"#{degree}\",") + print("\"#{short_degree}\",") + print("\"#{latitude}x#{longitude}\"") + puts("],") +end