null+****@clear*****
null+****@clear*****
2012年 7月 10日 (火) 14:35:16 JST
HAYASHI Kentaro 2012-07-10 14:35:16 +0900 (Tue, 10 Jul 2012) New Revision: e1a8ff500a9280c2d140d57296a16b1414eeed5d https://github.com/groonga/groonga/commit/e1a8ff500a9280c2d140d57296a16b1414eeed5d Log: geo: return the value of correct distance according to quadrant type Support to calculate the value of distance across the date line in south hemisphere. refs #1421 Modified files: lib/geo.c Modified: lib/geo.c (+2 -1) =================================================================== --- lib/geo.c 2012-07-10 15:07:19 +0900 (a6ee216) +++ lib/geo.c 2012-07-10 14:35:16 +0900 (e474696) @@ -1966,7 +1966,8 @@ grn_geo_distance_rectangle_raw(grn_ctx *ctx, lat2); distance = (east_distance + west_distance) * GRN_GEO_RADIUS; } else { - if (quad_type == QUADRANT_1ST_TO_2ND) { + if (quad_type == QUADRANT_1ST_TO_2ND || + quad_type == QUADRANT_4TH_TO_3RD) { longitude_delta = lng2 + M_2PI - lng1; latitude_delta = lat2 - lat1; slope = latitude_delta / longitude_delta; -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Télécharger