Revision 13895
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
1084 | 1084 |
|
1085 | 1085 |
|
1086 | 1086 |
-- |
1087 |
-- Name: contained_within__no_dateline(postgis.geometry, postgis.geometry); Type: FUNCTION; Schema: util; Owner: - |
|
1088 |
-- |
|
1089 |
|
|
1090 |
CREATE FUNCTION contained_within__no_dateline("inner" postgis.geometry, "outer" postgis.geometry) RETURNS boolean |
|
1091 |
LANGUAGE sql IMMUTABLE |
|
1092 |
SET search_path TO postgis |
|
1093 |
AS $_$ |
|
1094 |
/* search_path: st_coveredby() needs postgis to be in the search_path */ |
|
1095 |
/* must be st_coveredby() rather than st_within() to avoid unexpected behavior |
|
1096 |
at the shape border */ |
|
1097 |
SELECT postgis.st_coveredby($1, $2) |
|
1098 |
$_$; |
|
1099 |
|
|
1100 |
|
|
1101 |
-- |
|
1102 |
-- Name: FUNCTION contained_within__no_dateline("inner" postgis.geometry, "outer" postgis.geometry); Type: COMMENT; Schema: util; Owner: - |
|
1103 |
-- |
|
1104 |
|
|
1105 |
COMMENT ON FUNCTION contained_within__no_dateline("inner" postgis.geometry, "outer" postgis.geometry) IS ' |
|
1106 |
**WARNING**: this will not work on shapes that cross the date line, as the |
|
1107 |
geometry type does not support geocoordinate wraparound |
|
1108 |
'; |
|
1109 |
|
|
1110 |
|
|
1111 |
-- |
|
1087 | 1112 |
-- Name: contained_within_approx(postgis.geography, postgis.geography); Type: FUNCTION; Schema: util; Owner: - |
1088 | 1113 |
-- |
1089 | 1114 |
|
... | ... | |
4827 | 4852 |
|
4828 | 4853 |
|
4829 | 4854 |
-- |
4855 |
-- Name: @; Type: OPERATOR; Schema: util; Owner: - |
|
4856 |
-- |
|
4857 |
|
|
4858 |
CREATE OPERATOR @ ( |
|
4859 |
PROCEDURE = contained_within__no_dateline, |
|
4860 |
LEFTARG = postgis.geometry, |
|
4861 |
RIGHTARG = postgis.geometry |
|
4862 |
); |
|
4863 |
|
|
4864 |
|
|
4865 |
-- |
|
4830 | 4866 |
-- Name: ||%; Type: OPERATOR; Schema: util; Owner: - |
4831 | 4867 |
-- |
4832 | 4868 |
|
Also available in: Unified diff
schemas/util.sql: added contained_within__no_dateline(geometry, geometry) and corresponding operator @