> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/appendixes/contrib/earthdistance/earthdistance-point-based.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# F.14.2. 以 Point 為基礎的地球距離

## F.14.2. 以 Point 為基礎的地球距離 [#](#earthdistance-point-based) <a href="#earthdistance-point-based" id="earthdistance-point-based"></a>

模組的第二部分將地球位置表示為 `point` 型別的值，其中第一個分量表示度數的 經度，第二個分量表示度數的緯度。點採用 (經度, 緯度)，而非相反順序，因為 經度較接近 x 軸、緯度較接近 y 軸的直觀概念。

提供一個運算子，如[表 F.5](#earthdistance-point-operators) 所示。

### 表 F.5. 以 Point 為基礎的 Earthdistance 運算子 [#](#earthdistance-point-operators) <a href="#earthdistance-point-operators" id="earthdistance-point-operators"></a>

| <p>運算子</p><p>說明</p>                                                                                          |
| ------------------------------------------------------------------------------------------------------------ |
| <p><code>point</code> <code><@></code> <code>point</code> → <code>float8</code></p><p>計算地球表面兩點之間的法定英里距離。</p> |

<br>

請注意，與模組以 `cube` 為基礎的部分不同，這裡的單位是固定的；變更 `earth()` 函式不會影響此運算子的結果。

經度／緯度表示法的一項缺點是，必須留意接近極點與經度 +/- 180 度時的邊界 條件。以 `cube` 為基礎的表示法可避免這些不連續性。

[返回 F.14. earthdistance — 計算大圓距離](https://docs.postgresql.tw/19/appendixes/contrib/earthdistance.md#earthdistance)

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/earthdistance.html)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/appendixes/contrib/earthdistance/earthdistance-point-based.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
