|
1 | 1 | #include "line.h" |
2 | 2 |
|
3 | | -/* |
4 | | - * Line functions |
5 | | - */ |
| 3 | +/* Line functions */ |
6 | 4 |
|
7 | 5 | PG_FUNCTION_INFO_V1(sphereline_in); |
8 | 6 | PG_FUNCTION_INFO_V1(sphereline_from_point); |
@@ -37,8 +35,7 @@ PG_FUNCTION_INFO_V1(spheretrans_line); |
37 | 35 | PG_FUNCTION_INFO_V1(spheretrans_line_inverse); |
38 | 36 |
|
39 | 37 | /* |
40 | | - * Swaps begin and end of the line. "out" is pointer to the result spherical |
41 | | - * line. "in" is pointer to the input spherical line. |
| 38 | + * Swaps the beginning and ending of the line. |
42 | 39 | */ |
43 | 40 | static void |
44 | 41 | sline_swap_beg_end(SLine *out, const SLine *in) |
@@ -190,7 +187,6 @@ sline_min_max_lat(const SLine *sl, float8 *minlat, float8 *maxlat) |
190 | 187 | } |
191 | 188 | else |
192 | 189 | { |
193 | | - |
194 | 190 | SEuler se; |
195 | 191 | SLine nl; |
196 | 192 | SPoint tp; |
@@ -386,7 +382,8 @@ sphereline_circle_pos(const SLine *sl, const SCIRCLE *sc) |
386 | 382 | } |
387 | 383 | else if (FPle(((c.center.lat < 0) ? (-c.center.lat) : (c.center.lat)), |
388 | 384 | c.radius) && |
389 | | - FPge(c.center.lng, p[0].lng) && FPle(c.center.lng, p[1].lng)) |
| 385 | + FPge(c.center.lng, p[0].lng) && |
| 386 | + FPle(c.center.lng, p[1].lng)) |
390 | 387 | { |
391 | 388 | return PGS_CIRCLE_LINE_OVER; |
392 | 389 | } |
@@ -500,8 +497,8 @@ sline_sline_pos(const SLine *l1, const SLine *l2) |
500 | 497 | /* Check, sl2 is at equator */ |
501 | 498 | if (FPzero(p[2].lat) && FPzero(p[3].lat)) |
502 | 499 | { |
503 | | - bool a1 = spoint_at_sline(&p[2], &sl1); |
504 | | - bool a2 = spoint_at_sline(&p[3], &sl1); |
| 500 | + bool a1 = spoint_at_sline(&p[2], &sl1); |
| 501 | + bool a2 = spoint_at_sline(&p[3], &sl1); |
505 | 502 |
|
506 | 503 | if (a1 && a2) |
507 | 504 | { |
@@ -648,15 +645,15 @@ sline_center(SPoint *c, const SLine *sl) |
648 | 645 | Datum |
649 | 646 | sphereline_in(PG_FUNCTION_ARGS) |
650 | 647 | { |
651 | | - SLine *sl = (SLine *) palloc(sizeof(SLine)); |
652 | | - char *c = PG_GETARG_CSTRING(0); |
| 648 | + SLine *sl = (SLine *) palloc(sizeof(SLine)); |
| 649 | + char *c = PG_GETARG_CSTRING(0); |
653 | 650 | unsigned char etype[3]; |
654 | 651 | float8 eang[3], |
655 | 652 | length; |
656 | 653 | SEuler se, |
657 | | - stmp, |
658 | | - so; |
659 | | - int i; |
| 654 | + stmp, |
| 655 | + so; |
| 656 | + int i; |
660 | 657 |
|
661 | 658 | void sphere_yyparse(void); |
662 | 659 |
|
@@ -1039,8 +1036,7 @@ spheretrans_line_inverse(PG_FUNCTION_ARGS) |
1039 | 1036 | Datum ret; |
1040 | 1037 |
|
1041 | 1038 | spheretrans_inverse(&tmp, se); |
1042 | | - ret = DirectFunctionCall2( |
1043 | | - spheretrans_line, |
| 1039 | + ret = DirectFunctionCall2(spheretrans_line, |
1044 | 1040 | sl, PointerGetDatum(&tmp)); |
1045 | 1041 | PG_RETURN_DATUM(ret); |
1046 | 1042 |
|
|
0 commit comments