Skip to content

Commit

Permalink
geo: return the value of correct distance according to quadrant type
Browse files Browse the repository at this point in the history
Add missing support for calculating distance between 4th quadrant and
3rd one across meridian.

refs #1419
  • Loading branch information
kenhys committed Jul 5, 2012
1 parent 9e1de21 commit 63e799b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/geo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,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_3RD_TO_4TH;
} else if (point1->longitude > 0 && point2->longitude < 0 &&
point1->latitude <= 0 && point2->latitude <= 0) {
return QUADRANT_4TH_TO_3RD;
} else {
/* FIXME */
return QUADRANT_1ST;
Expand Down

0 comments on commit 63e799b

Please sign in to comment.