null+****@clear*****
null+****@clear*****
2012年 7月 3日 (火) 18:38:35 JST
HAYASHI Kentaro 2012-07-03 18:38:35 +0900 (Tue, 03 Jul 2012) New Revision: b046ec7f0386c260aa95019769f3f8faf1b7d715 https://github.com/groonga/groonga/commit/b046ec7f0386c260aa95019769f3f8faf1b7d715 Log: geo: return the value of correct distance according to quadrant type Add missing support for calculating distance between 3rd quadrant and 4th one across meridian. refs #1418 Modified files: lib/geo.c Modified: lib/geo.c (+3 -0) =================================================================== --- lib/geo.c 2012-07-03 17:24:56 +0900 (db6dfde) +++ lib/geo.c 2012-07-03 18:38:35 +0900 (a227aa6) @@ -1896,6 +1896,9 @@ geo_quadrant_type(grn_geo_point *point1, grn_geo_point *point2) } else if (point1->longitude < 0 && point2->longitude > 0 && point1->latitude >= 0 && point2->latitude >= 0) { return QUADRANT_2ND_TO_1ST; + } else if (point1->longitude < 0 && point2->longitude > 0 && + point1->latitude <= 0 && point2->latitude <= 0) { + return QUADRANT_3RD_TO_4TH; } else { /* FIXME */ return QUADRANT_1ST; -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... 下载