File: contains-ops-fixes-2.sql.in

package info (click to toggle)
pgsphere 1.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,220 kB
  • sloc: ansic: 13,926; sql: 6,895; cpp: 853; makefile: 278; perl: 168; yacc: 145; python: 106; lex: 55; xml: 51; sh: 1
file content (26 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- fix typo in commutator of OPERATOR !@>(spoly, sellipse) (a.k.a. !~) introduced in commits 2798ed96f9282ddeee21d5ddd3e256bbb9b4f36f and 244c1549c492426b62bc926c9ac2ad21f3ccd0c1

DROP OPERATOR !@> (spoly, sellipse) CASCADE;
DROP OPERATOR  !~ (spoly, sellipse) CASCADE;

CREATE OPERATOR !@> (
   LEFTARG    = spoly,
   RIGHTARG   = sellipse,
   PROCEDURE  = spoly_contains_ellipse_neg,
   COMMUTATOR = '!<@',
   NEGATOR    = '@>',
   RESTRICT   = contsel,
   JOIN       = contjoinsel
);
COMMENT ON OPERATOR !@> (spoly, sellipse) IS 'true if spherical polygon (LHS) does not contain spherical ellipse (RHS)';

CREATE OPERATOR !~ (
   LEFTARG    = spoly,
   RIGHTARG   = sellipse,
   PROCEDURE  = spoly_contains_ellipse_neg,
   COMMUTATOR = '!@',
   NEGATOR    = '~',
   RESTRICT   = contsel,
   JOIN       = contjoinsel
);
COMMENT ON OPERATOR !~ (spoly, sellipse) IS 'true if spherical polygon (LHS) does not contain spherical ellipse (RHS)';