pgLatLon

diff latlon--0.5.sql @ 20:8a8d6dc44337

Changed/fixed behavior of "contains" operator regarding perimeters; Added "contains" operator for ebox type; Minor changes in README
author jbe
date Mon Sep 12 18:00:52 2016 +0200 (2016-09-12)
parents bd166e5e02cb
children
line diff
     1.1 --- a/latlon--0.5.sql	Fri Sep 09 23:44:28 2016 +0200
     1.2 +++ b/latlon--0.5.sql	Mon Sep 12 18:00:52 2016 +0200
     1.3 @@ -1134,6 +1134,32 @@
     1.4    join = areajoinsel
     1.5  );
     1.6  
     1.7 +CREATE FUNCTION ebox_contains_castwrap(ebox, ebox)
     1.8 +  RETURNS boolean
     1.9 +  LANGUAGE sql IMMUTABLE AS 'SELECT $1::ecluster @> $2::ecluster';
    1.10 +
    1.11 +CREATE OPERATOR @> (
    1.12 +  leftarg = ebox,
    1.13 +  rightarg = ebox,
    1.14 +  procedure = ebox_contains_castwrap,
    1.15 +  commutator = <@,
    1.16 +  restrict = areasel,
    1.17 +  join = areajoinsel
    1.18 +);
    1.19 +
    1.20 +CREATE FUNCTION ebox_contains_swapped_castwrap(ebox, ebox)
    1.21 +  RETURNS boolean
    1.22 +  LANGUAGE sql IMMUTABLE AS 'SELECT $2::ecluster @> $1::ecluster';
    1.23 +
    1.24 +CREATE OPERATOR <@ (
    1.25 +  leftarg = ebox,
    1.26 +  rightarg = ebox,
    1.27 +  procedure = ebox_contains_swapped_castwrap,
    1.28 +  commutator = @>,
    1.29 +  restrict = areasel,
    1.30 +  join = areajoinsel
    1.31 +);
    1.32 +
    1.33  CREATE FUNCTION ebox_ecluster_contains_castwrap(ebox, ecluster)
    1.34    RETURNS boolean
    1.35    LANGUAGE sql IMMUTABLE AS 'SELECT $1::ecluster @> $2';

Impressum / About Us