You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/sql/geography/Geography-Functions.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,4 +53,6 @@ These functions operate on geography type objects.
53
53
|[ST_Distance](Geography-Functions/ST_Distance.md)| Double | Return the minimum geodesic distance between two geographies in meters. | v1.9.0 |
54
54
|[ST_Length](Geography-Functions/ST_Length.md)| Double | Return the spherical length of a geography in meters, summed along great-circle edges. | v1.9.1 |
55
55
|[ST_Contains](Geography-Functions/ST_Contains.md)| Boolean | Test whether geography A fully contains geography B. | v1.9.0 |
56
+
|[ST_DWithin](Geography-Functions/ST_DWithin.md)| Boolean | Test whether two geographies are within a given geodesic distance (in meters) of each other. | v1.9.1 |
57
+
|[ST_Within](Geography-Functions/ST_Within.md)| Boolean | Test whether geography A is fully within geography B. | v1.9.1 |
56
58
|[ST_Equals](Geography-Functions/ST_Equals.md)| Boolean | Test whether two geographies are spatially equal. | v1.9.1 |
Licensed to the Apache Software Foundation (ASF) under one
3
+
or more contributor license agreements. See the NOTICE file
4
+
distributed with this work for additional information
5
+
regarding copyright ownership. The ASF licenses this file
6
+
to you under the Apache License, Version 2.0 (the
7
+
"License"); you may not use this file except in compliance
8
+
with the License. You may obtain a copy of the License at
9
+
10
+
http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+
Unless required by applicable law or agreed to in writing,
13
+
software distributed under the License is distributed on an
14
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+
KIND, either express or implied. See the License for the
16
+
specific language governing permissions and limitations
17
+
under the License.
18
+
-->
19
+
20
+
# ST_DWithin
21
+
22
+
Introduction: Tests whether two geographies are within a given geodesic distance (in meters) of each other on the sphere. The minimum great-circle distance between any two points on the two geographies is compared against the threshold; the test is inclusive (returns true when the minimum distance equals the threshold).
Licensed to the Apache Software Foundation (ASF) under one
3
+
or more contributor license agreements. See the NOTICE file
4
+
distributed with this work for additional information
5
+
regarding copyright ownership. The ASF licenses this file
6
+
to you under the Apache License, Version 2.0 (the
7
+
"License"); you may not use this file except in compliance
8
+
with the License. You may obtain a copy of the License at
9
+
10
+
http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+
Unless required by applicable law or agreed to in writing,
13
+
software distributed under the License is distributed on an
14
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+
KIND, either express or implied. See the License for the
16
+
specific language governing permissions and limitations
17
+
under the License.
18
+
-->
19
+
20
+
# ST_Within
21
+
22
+
Introduction: Tests whether geography `A` is fully within geography `B` using S2 spherical boolean operations. Returns true when every point of `A`'s interior lies in `B`'s interior. By OGC convention, `ST_Within(A, B)` is equivalent to `ST_Contains(B, A)`, and shares the same boundary semantics.
23
+
24
+
Boundary semantics on the sphere are inherited from S2's boolean operations and depend on each ring's vertex orientation: along an edge that is "owned" by `B`'s boundary the test returns true, and along the opposite edge it returns false. Do not rely on a specific result for points that lie exactly on `B`'s boundary; for predictable behavior, use a strict interior point or expand `B` slightly with `ST_Buffer` before testing.
0 commit comments