提交 93d80d33 编写于 作者: T Thomas G. Lockhart

Define boolean functions and operators for lseg <, <=, <>, >=, >.

Define functions and operators for closest point to lseg on box,
 to line on lseg, to lseg on lseg.
Define function and operator for length of lseg.
Change length operator from '??' to '@-@'
 (currently defined for path and lseg).
上级 3f52d170
......@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_operator.h,v 1.23 1998/01/24 22:48:36 momjian Exp $
* $Id: pg_operator.h,v 1.24 1998/02/03 16:01:54 thomas Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
......@@ -387,7 +387,7 @@ DATA(insert OID = 795 ( "<=" PGUID 0 b t f 602 602 701 794 0 0 0 path_n
DATA(insert OID = 796 ( ">=" PGUID 0 b t f 602 602 701 793 0 0 0 path_n_ge intltsel intltjoinsel ));
DATA(insert OID = 797 ( "#" PGUID 0 l t f 0 602 23 0 0 0 0 path_npoints - - ));
DATA(insert OID = 798 ( "?#" PGUID 0 b t f 602 602 16 0 0 0 0 path_inter - - ));
DATA(insert OID = 799 ( "??" PGUID 0 l t f 0 602 701 0 0 0 0 path_length - - ));
DATA(insert OID = 799 ( "@-@" PGUID 0 l t f 0 602 701 0 0 0 0 path_length - - ));
DATA(insert OID = 800 ( ">^" PGUID 0 b t f 603 603 16 0 0 0 0 box_above intltsel intltjoinsel ));
DATA(insert OID = 801 ( "<^" PGUID 0 b t f 603 603 16 0 0 0 0 box_below intltsel intltjoinsel ));
DATA(insert OID = 802 ( "?#" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap - - ));
......@@ -647,8 +647,18 @@ DATA(insert OID = 1559 ( "##" PGUID 0 b t f 600 603 600 0 0 0 0 close_p
DATA(insert OID = 1566 ( "##" PGUID 0 b t f 601 628 600 0 0 0 0 close_sl - - ));
DATA(insert OID = 1567 ( "##" PGUID 0 b t f 601 603 600 0 0 0 0 close_sb - - ));
DATA(insert OID = 1568 ( "##" PGUID 0 b t f 628 603 600 0 0 0 0 close_lb - - ));
DATA(insert OID = 1577 ( "##" PGUID 0 b t f 628 601 600 0 0 0 0 close_ls - - ));
DATA(insert OID = 1578 ( "##" PGUID 0 b t f 601 601 600 0 0 0 0 close_lseg - - ));
DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 1186 1186 0 0 0 0 timespan_div - - ));
DATA(insert OID = 1586 ( "<>" PGUID 0 b t f 601 601 16 1535 0 0 0 lseg_eq intltsel - ));
DATA(insert OID = 1587 ( "<" PGUID 0 b t f 601 601 16 1590 0 0 0 lseg_lt intltsel - ));
DATA(insert OID = 1588 ( "<=" PGUID 0 b t f 601 601 16 1589 0 0 0 lseg_le intltsel - ));
DATA(insert OID = 1589 ( ">" PGUID 0 b t f 601 601 16 1588 0 0 0 lseg_gt intltsel - ));
DATA(insert OID = 1590 ( ">=" PGUID 0 b t f 601 601 16 1587 0 0 0 lseg_ge intltsel - ));
DATA(insert OID = 1591 ( "@-@" PGUID 0 l t f 0 601 701 0 0 0 0 lseg_length - - ));
/*
* function prototypes
*/
......
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.45 1998/01/26 01:01:31 momjian Exp $
* $Id: pg_proc.h,v 1.46 1998/02/03 16:01:59 thomas Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
......@@ -781,11 +781,11 @@ DESCR("distance between");
DATA(insert OID = 365 ( dist_sb PGUID 11 f t f 2 f 701 "601 603" 100 0 0 100 foo bar ));
DESCR("distance between");
DATA(insert OID = 366 ( close_ps PGUID 11 f t f 2 f 600 "600 601" 100 0 0 100 foo bar ));
DESCR("");
DESCR("closest point on line segment");
DATA(insert OID = 367 ( close_pb PGUID 11 f t f 2 f 600 "600 603" 100 0 0 100 foo bar ));
DESCR("");
DESCR("closest point on box");
DATA(insert OID = 368 ( close_sb PGUID 11 f t f 2 f 600 "601 603" 100 0 0 100 foo bar ));
DESCR("");
DESCR("closest point to line segment on box");
DATA(insert OID = 369 ( on_ps PGUID 11 f t f 2 f 16 "600 601" 100 0 0 100 foo bar ));
DESCR("contained in");
DATA(insert OID = 370 ( path_distance PGUID 11 f t f 2 f 701 "602 602" 100 0 1 0 foo bar ));
......@@ -1293,11 +1293,11 @@ DESCR("contained in");
DATA(insert OID = 960 ( on_sl PGUID 11 f t f 2 f 16 "601 628" 100 0 10 100 foo bar ));
DESCR("contained in");
DATA(insert OID = 961 ( close_pl PGUID 11 f t f 2 f 600 "600 628" 100 0 10 100 foo bar ));
DESCR("");
DESCR("closest point on line");
DATA(insert OID = 962 ( close_sl PGUID 11 f t f 2 f 600 "601 628" 100 0 10 100 foo bar ));
DESCR("");
DESCR("closest point to line segment on line");
DATA(insert OID = 963 ( close_lb PGUID 11 f t f 2 f 600 "628 603" 100 0 10 100 foo bar ));
DESCR("");
DESCR("closest point to line on box");
DATA(insert OID = 964 ( lo_unlink PGUID 11 f t f 1 f 23 "23" 100 0 0 100 foo bar ));
DESCR("large object unlink(delete)");
......@@ -1329,19 +1329,19 @@ DESCR("less-than-or-equals");
DATA(insert OID = 986 ( path_n_ge PGUID 11 f t f 2 f 16 "602 602" 100 0 0 100 foo bar ));
DESCR("greater-than-or-equals");
DATA(insert OID = 987 ( path_length PGUID 11 f t f 1 f 701 "602" 100 0 1 0 foo bar ));
DESCR("");
DESCR("sum of path segments");
DATA(insert OID = 988 ( point_ne PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar ));
DESCR("");
DESCR("not equal");
DATA(insert OID = 989 ( point_vert PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar ));
DESCR("");
DESCR("is vertical");
DATA(insert OID = 990 ( point_horiz PGUID 11 f t f 2 f 16 "600 600" 100 0 0 100 foo bar ));
DESCR("");
DESCR("is horizontal");
DATA(insert OID = 991 ( point_distance PGUID 11 f t f 2 f 701 "600 600" 100 0 0 100 foo bar ));
DESCR("distance between");
DATA(insert OID = 992 ( point_slope PGUID 11 f t f 2 f 701 "600 600" 100 0 0 100 foo bar ));
DESCR("");
DESCR("slope between points");
DATA(insert OID = 993 ( lseg_construct PGUID 11 f t f 2 f 601 "600 600" 100 0 0 100 foo bar ));
DESCR("");
DESCR("convert points to line segment");
DATA(insert OID = 994 ( lseg_intersect PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("intersects");
DATA(insert OID = 995 ( lseg_parallel PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
......@@ -1349,9 +1349,9 @@ DESCR("is parallel to");
DATA(insert OID = 996 ( lseg_perp PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("is perpendicular to");
DATA(insert OID = 997 ( lseg_vertical PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar ));
DESCR("");
DESCR("is vertical");
DATA(insert OID = 998 ( lseg_horizontal PGUID 11 f t f 1 f 16 "601" 100 0 0 100 foo bar ));
DESCR("");
DESCR("is horizontal");
DATA(insert OID = 999 ( lseg_eq PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("equals");
......@@ -1922,6 +1922,23 @@ DESCR("convert");
DATA(insert OID = 1481 ( text_substr PGUID 11 f t f 3 f 25 "25 23 23" 100 0 0 100 foo bar ));
DESCR("return portion of string");
DATA(insert OID = 1482 ( lseg_ne PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("not equal");
DATA(insert OID = 1483 ( lseg_lt PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("less-than");
DATA(insert OID = 1484 ( lseg_le PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("less-than-or-equals");
DATA(insert OID = 1485 ( lseg_gt PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("greater-than");
DATA(insert OID = 1486 ( lseg_ge PGUID 11 f t f 2 f 16 "601 601" 100 0 0 100 foo bar ));
DESCR("greater-than-or-equals");
DATA(insert OID = 1487 ( lseg_length PGUID 11 f t f 1 f 701 "601" 100 0 1 0 foo bar ));
DESCR("distance between endpoints");
DATA(insert OID = 1488 ( close_ls PGUID 11 f t f 2 f 600 "628 601" 100 0 10 100 foo bar ));
DESCR("closest point to line on line segment");
DATA(insert OID = 1489 ( close_lseg PGUID 11 f t f 2 f 600 "601 601" 100 0 10 100 foo bar ));
DESCR("closest point to line segment on line segment");
DATA(insert OID = 1530 ( point PGUID 14 f t f 2 f 600 "601 601" 100 0 0 100 "select lseg_interpt($1, $2)" - ));
DESCR("convert");
DATA(insert OID = 1531 ( point PGUID 14 f t f 1 f 600 "718" 100 0 0 100 "select circle_center($1)" - ));
......@@ -1953,7 +1970,7 @@ DESCR("");
DATA(insert OID = 1550 ( path PGUID 14 f t f 1 f 602 "604" 100 0 0 100 "select poly_path($1)" - ));
DESCR("");
DATA(insert OID = 1551 ( length PGUID 14 f t f 1 f 701 "602" 100 0 1 0 "select path_length($1)" - ));
DESCR("");
DESCR("sum of lengths of path segments");
DATA(insert OID = 1552 ( points PGUID 14 f t f 1 f 23 "602" 100 0 0 100 "select path_npoints($1)" - ));
DESCR("");
DATA(insert OID = 1553 ( pclose PGUID 14 f t f 1 f 602 "602" 100 0 0 100 "select path_close($1)" - ));
......@@ -1992,6 +2009,8 @@ DATA(insert OID = 1574 ( points PGUID 14 f t f 1 f 23 "604" 100 0 0 100 "sel
DESCR("");
DATA(insert OID = 1575 ( center PGUID 14 f t f 1 f 600 "604" 100 0 0 100 "select poly_center($1)" - ));
DESCR("");
DATA(insert OID = 1576 ( length PGUID 14 f t f 1 f 701 "601" 100 0 1 0 "select lseg_length($1)" - ));
DESCR("distance between endpoints");
DATA(insert OID = 1579 ( circle PGUID 14 f t f 1 f 718 "603" 100 0 0 100 "select box_circle($1)" - ));
DESCR("convert");
......
......@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geo_decls.h,v 1.17 1998/01/24 22:50:43 momjian Exp $
* $Id: geo_decls.h,v 1.18 1998/02/03 16:01:06 thomas Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
......@@ -170,6 +170,12 @@ extern bool lseg_perp(LSEG *l1, LSEG *l2);
extern bool lseg_vertical(LSEG *lseg);
extern bool lseg_horizontal(LSEG *lseg);
extern bool lseg_eq(LSEG *l1, LSEG *l2);
extern bool lseg_ne(LSEG *l1, LSEG *l2);
extern bool lseg_lt(LSEG *l1, LSEG *l2);
extern bool lseg_le(LSEG *l1, LSEG *l2);
extern bool lseg_gt(LSEG *l1, LSEG *l2);
extern bool lseg_ge(LSEG *l1, LSEG *l2);
extern double *lseg_length(LSEG *lseg);
extern double *lseg_distance(LSEG *l1, LSEG *l2);
extern Point *lseg_center(LSEG *lseg);
extern Point *lseg_interpt(LSEG *l1, LSEG *l2);
......@@ -180,11 +186,13 @@ extern double *dist_pb(Point *pt, BOX *box);
extern double *dist_sl(LSEG *lseg, LINE *line);
extern double *dist_sb(LSEG *lseg, BOX *box);
extern double *dist_lb(LINE *line, BOX *box);
extern Point *close_lseg(LSEG *l1, LSEG *l2);
extern Point *close_pl(Point *pt, LINE *line);
extern Point *close_ps(Point *pt, LSEG *lseg);
extern Point *close_pb(Point *pt, BOX *box);
extern Point *close_sl(LSEG *lseg, LINE *line);
extern Point *close_sb(LSEG *lseg, BOX *box);
extern Point *close_ls(LINE *line, LSEG *lseg);
extern Point *close_lb(LINE *line, BOX *box);
extern bool on_pl(Point *pt, LINE *line);
extern bool on_ps(Point *pt, LSEG *lseg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册