Revision 13894
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
1084 | 1084 |
|
1085 | 1085 |
|
1086 | 1086 |
-- |
1087 |
-- Name: contained_within(postgis.geography, postgis.geography); Type: FUNCTION; Schema: util; Owner: - |
|
1087 |
-- Name: contained_within_approx(postgis.geography, postgis.geography); Type: FUNCTION; Schema: util; Owner: -
|
|
1088 | 1088 |
-- |
1089 | 1089 |
|
1090 |
CREATE FUNCTION contained_within("inner" postgis.geography, "outer" postgis.geography) RETURNS boolean |
|
1090 |
CREATE FUNCTION contained_within_approx("inner" postgis.geography, "outer" postgis.geography) RETURNS boolean
|
|
1091 | 1091 |
LANGUAGE sql IMMUTABLE |
1092 | 1092 |
SET search_path TO postgis |
1093 | 1093 |
AS $_$ |
... | ... | |
1097 | 1097 |
|
1098 | 1098 |
|
1099 | 1099 |
-- |
1100 |
-- Name: FUNCTION contained_within_approx("inner" postgis.geography, "outer" postgis.geography); Type: COMMENT; Schema: util; Owner: - |
|
1101 |
-- |
|
1102 |
|
|
1103 |
COMMENT ON FUNCTION contained_within_approx("inner" postgis.geography, "outer" postgis.geography) IS ' |
|
1104 |
**WARNING**: the geography type stores all edges as arcs of great circles, |
|
1105 |
resulting in the latitude lines of bounding boxes bulging outward from the true |
|
1106 |
bounding box. this will create false positives above and below the bounding box. |
|
1107 |
'; |
|
1108 |
|
|
1109 |
|
|
1110 |
-- |
|
1100 | 1111 |
-- Name: contains(text, text); Type: FUNCTION; Schema: util; Owner: - |
1101 | 1112 |
-- |
1102 | 1113 |
|
... | ... | |
4799 | 4810 |
-- |
4800 | 4811 |
|
4801 | 4812 |
CREATE OPERATOR @ ( |
4802 |
PROCEDURE = contained_within, |
|
4813 |
PROCEDURE = contained_within_approx,
|
|
4803 | 4814 |
LEFTARG = postgis.geography, |
4804 | 4815 |
RIGHTARG = postgis.geography |
4805 | 4816 |
); |
Also available in: Unified diff
schemas/util.sql: contained_within(): renamed to contained_within_approx() because the latitude lines of geography type bounding boxes bulge outward, creating false positives above and below the bounding box