whombx
null+****@clear*****
Sat Aug 10 08:47:54 JST 2013
whombx 2013-08-10 08:47:54 +0900 (Sat, 10 Aug 2013) New Revision: 42bc71f2ec55ae931fba1753cc7b5d9e3977fc86 https://github.com/groonga/groonga/commit/42bc71f2ec55ae931fba1753cc7b5d9e3977fc86 Merged 6285b55: Merge branch 'grn-geo' of https://github.com/whombx/groonga into whombx-grn-geo Message: doc: move grn_geo documents from groonga.h to Sphinx text Added files: doc/source/reference/api/grn_geo.txt Modified files: doc/files.am include/groonga.h Modified: doc/files.am (+4 -0) =================================================================== --- doc/files.am 2013-08-09 23:39:17 +0900 (b1a688b) +++ doc/files.am 2013-08-10 08:47:54 +0900 (e79b026) @@ -352,6 +352,7 @@ absolute_source_files = \ $(top_srcdir)/doc/source/reference/api/grn_db.txt \ $(top_srcdir)/doc/source/reference/api/grn_encoding.txt \ $(top_srcdir)/doc/source/reference/api/grn_expr.txt \ + $(top_srcdir)/doc/source/reference/api/grn_geo.txt \ $(top_srcdir)/doc/source/reference/api/grn_index_cursor.txt \ $(top_srcdir)/doc/source/reference/api/grn_info.txt \ $(top_srcdir)/doc/source/reference/api/grn_obj.txt \ @@ -823,6 +824,7 @@ source_files_relative_from_doc_dir = \ source/reference/api/grn_db.txt \ source/reference/api/grn_encoding.txt \ source/reference/api/grn_expr.txt \ + source/reference/api/grn_geo.txt \ source/reference/api/grn_index_cursor.txt \ source/reference/api/grn_info.txt \ source/reference/api/grn_obj.txt \ @@ -1061,6 +1063,7 @@ html_files_relative_from_locale_dir = \ html/_sources/reference/api/grn_db.txt \ html/_sources/reference/api/grn_encoding.txt \ html/_sources/reference/api/grn_expr.txt \ + html/_sources/reference/api/grn_geo.txt \ html/_sources/reference/api/grn_index_cursor.txt \ html/_sources/reference/api/grn_info.txt \ html/_sources/reference/api/grn_obj.txt \ @@ -1232,6 +1235,7 @@ html_files_relative_from_locale_dir = \ html/reference/api/grn_db.html \ html/reference/api/grn_encoding.html \ html/reference/api/grn_expr.html \ + html/reference/api/grn_geo.html \ html/reference/api/grn_index_cursor.html \ html/reference/api/grn_info.html \ html/reference/api/grn_obj.html \ Added: doc/source/reference/api/grn_geo.txt (+55 -0) 100644 =================================================================== --- /dev/null +++ doc/source/reference/api/grn_geo.txt 2013-08-10 08:47:54 +0900 (99d3a98) @@ -0,0 +1,55 @@ +.. -*- rst -*- + +.. highlightlang:: none + +``grn_geo`` +=========== + +Summary +------- + +TODO... + +Example +------- + +TODO... + +Reference +--------- + +.. c:type:: grn_geo_point + +.. c:function:: grn_rc grn_geo_select_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point, grn_obj *res, grn_operator op) + + It selects records that are in the rectangle specified by top_left_point parameter and bottom_right_point parameter. Records are searched by index parameter. Found records are added to res parameter table with op parameter operation. + + :param index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. + :param top_left_point: the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + :param bottom_right_point: the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + :param res: the table to store found record IDs. It must be ``GRN_TABLE_HASH_KEY`` type table. + :param op: the operator for matched records. + +.. c:function:: int grn_geo_estimate_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point) + + It estimates number of records in the rectangle specified by top_left_point parameter and bottom_right_point parameter. Number of records is estimated by index parameter. If an error is occurred, -1 is returned. + + :param index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. + :param top_left_point: the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + :param bottom_right_point: the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + +.. c:function:: grn_obj *grn_geo_cursor_open_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point, int offset, int limit) + + It opens a cursor to get records in the rectangle specfied by top_left_point parameter and bottom_right_point parameter. + + :param index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. + :param top_left_point: the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + :param bottom_right_point: the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint) + :param offset: the cursor returns records from offset parameter position. offset parameter is based on 0. + :param limit: the cursor returns at most limit parameter records. -1 means no limit. + +.. c:function:: grn_posting *grn_geo_cursor_next(grn_ctx *ctx, grn_obj *cursor) + + It returns the next posting that has record ID. It returns NULL after all records are returned. + + :param cursor: the geo cursor. Modified: include/groonga.h (+0 -61) =================================================================== --- include/groonga.h 2013-08-09 23:39:17 +0900 (d99e79d) +++ include/groonga.h 2013-08-10 08:47:54 +0900 (84355fd) @@ -1175,83 +1175,22 @@ typedef struct { int longitude; } grn_geo_point; - -/** - * grn_geo_select_in_rectangle: - * @index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. - * @top_left_point: the top left point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * @bottom_right_point: the bottom right point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * @res: the table to store found record IDs. It must be - * GRN_TABLE_HASH_KEY type table. - * @op: the operator for matched records. - * - * It selects records that are in the rectangle specified by - * @top_left_point and @bottom_right_point. Records are - * searched by @index. Found records are added to @res table - * with @op operation. - **/ GRN_API grn_rc grn_geo_select_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point, grn_obj *res, grn_operator op); - -/** - * grn_geo_estimate_in_rectangle: - * @index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. - * @top_left_point: the top left point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * @bottom_right_point: the bottom right point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * - * It estimates number of records in the rectangle specified - * by @top_left_point and @bottom_right_point. Number of - * records is estimated by @index. If an error is occurred, - * -1 is returned. - **/ GRN_API int grn_geo_estimate_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point); - -/** - * grn_geo_cursor_open_in_rectangle: - * @index: the index column for TokyoGeoPoint or WGS84GeoPpoint type. - * @top_left_point: the top left point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * @bottom_right_point: the bottom right point of the target - * rectangle. (ShortText, Text, LongText, TokyoGeoPoint or - * WGS84GeoPoint) - * @offset: the cursor returns records from @offset - * position. @offset is based on 0. - * @limit: the cursor returns at most @limit records. -1 - * means no limit. - * - * It opens a cursor to get records in the rectangle - * specfied by @top_left_point and @bottom_right_point. - **/ GRN_API grn_obj *grn_geo_cursor_open_in_rectangle(grn_ctx *ctx, grn_obj *index, grn_obj *top_left_point, grn_obj *bottom_right_point, int offset, int limit); - -/** - * grn_geo_cursor_next: - * @cursor: the geo cursor. - * - * It returns the next posting that has record ID. It - * returns NULL after all records are returned. - **/ GRN_API grn_posting *grn_geo_cursor_next(grn_ctx *ctx, grn_obj *cursor); -------------- next part -------------- HTML����������������������������... 下載