Add upgradepath(), isoldpath(), upgradepoly() and revertpoly() to allow

upgrading from existing pre-v6.1 path and polygon geometric data types.
This commit is contained in:
Thomas G. Lockhart 1997-06-03 14:11:28 +00:00
parent 3887d41b13
commit 4bd4a55b98
2 changed files with 19 additions and 5 deletions

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.22 1997/05/14 04:34:19 thomas Exp $
* $Id: pg_proc.h,v 1.23 1997/06/03 14:11:28 thomas Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@ -666,6 +666,12 @@ DATA(insert OID = 927 ( oidint4ne PGUID 11 f t f 2 f 16 "910 910" 100 0 0 10
DATA(insert OID = 928 ( oidint4cmp PGUID 11 f t f 2 f 23 "910 910" 100 0 0 100 foo bar));
DATA(insert OID = 929 ( mkoidint4 PGUID 11 f t f 2 f 910 "26 23" 100 0 0 100 foo bar));
/* isoldpath, upgradepath, upgradepoly, revertpoly are used to update pre-v6.1 to v6.1 - tgl 97/06/03 */
DATA(insert OID = 936 ( isoldpath PGUID 11 f t f 1 f 16 "602" 100 0 0 100 foo bar ));
DATA(insert OID = 937 ( upgradepath PGUID 11 f t f 1 f 602 "602" 100 0 0 100 foo bar ));
DATA(insert OID = 938 ( upgradepoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar ));
DATA(insert OID = 939 ( revertpoly PGUID 11 f t f 1 f 604 "604" 100 0 0 100 foo bar ));
DATA(insert OID = 940 ( oidnamein PGUID 11 f t f 1 f 911 "0" 100 0 0 100 foo bar));
DATA(insert OID = 941 ( oidnameout PGUID 11 f t f 1 f 19 "0" 100 0 0 100 foo bar));
DATA(insert OID = 942 ( oidnamelt PGUID 11 f t f 2 f 16 "911 911" 100 0 0 100 foo bar));

View File

@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geo_decls.h,v 1.4 1997/05/06 07:24:42 thomas Exp $
* $Id: geo_decls.h,v 1.5 1997/06/03 14:10:32 thomas Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
@ -196,9 +196,6 @@ extern bool path_inter(PATH *p1, PATH *p2);
extern double *path_distance(PATH *p1, PATH *p2);
extern double *path_length(PATH *path);
/* private routines */
extern double path_ln(PATH *path);
extern bool path_isclosed(PATH *path);
extern bool path_isopen(PATH *path);
extern int4 path_npoints(PATH *path);
@ -212,7 +209,13 @@ extern PATH *path_mul_pt(PATH *path, Point *point);
extern PATH *path_div_pt(PATH *path, Point *point);
extern POLYGON *path_poly(PATH *path);
extern PATH *upgradepath(PATH *path);
extern bool isoldpath(PATH *path);
/* private routines */
extern double path_ln(PATH *path);
/* public point routines */
extern Point *point_in(char *str);
extern char *point_out(Point *pt);
extern Point *point_construct(double x, double y);
@ -238,6 +241,7 @@ extern Point *point_sub(Point *p1, Point *p2);
extern Point *point_mul(Point *p1, Point *p2);
extern Point *point_div(Point *p1, Point *p2);
/* public lseg routines */
extern LSEG *lseg_in(char *str);
extern char *lseg_out(LSEG *ls);
extern bool lseg_intersect(LSEG *l1, LSEG *l2);
@ -278,6 +282,7 @@ extern void statlseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
extern double lseg_dt(LSEG *l1, LSEG *l2);
extern void make_bound_box(POLYGON *poly);
/* public polygon routines */
extern POLYGON *poly_in(char *s);
extern char *poly_out(POLYGON *poly);
extern bool poly_left(POLYGON *polya, POLYGON *polyb);
@ -293,7 +298,10 @@ extern int4 poly_npoints(POLYGON *poly);
extern BOX *poly_box(POLYGON *poly);
extern PATH *poly_path(POLYGON *poly);
extern POLYGON *box_poly(BOX *box);
extern POLYGON *upgradepoly(POLYGON *poly);
extern POLYGON *revertpoly(POLYGON *poly);
/* public circle routines */
extern CIRCLE *circle_in(char *str);
extern char *circle_out(CIRCLE *circle);
extern bool circle_same(CIRCLE *circle1, CIRCLE *circle2);