

 Amazon Redshift は、パッチ 198 以降、新しい Python UDF の作成をサポートしなくなります。既存の Python UDF は、2026 年 6 月 30 日まで引き続き機能します。詳細については、[ブログ記事](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)を参照してください。

# ST\$1Azimuth
<a name="ST_Azimuth-function"></a>

ST\$1Azimuth は、2 つの入力ポイントの 2D 射影を使用して、北を基準としたデカルト方位角を返します。

## 構文
<a name="ST_Azimuth-function-syntax"></a>

```
ST_Azimuth(point1, point2)
```

## 引数
<a name="ST_Azimuth-function-arguments"></a>

 *point1*   
データ型 `POINT` の `GEOMETRY` 値。*point1* の空間リファレンスシステム識別子 (SRID) は *point2* の SRID と一致する必要があります。

 *point2*   
データ型 `POINT` の `GEOMETRY` 値。*point2* の SRID は、*point1* の SRID と一致する必要があります。

## 戻り型
<a name="ST_Azimuth-function-return"></a>

`DOUBLE PRECISION` データ型のラジアンの角度である数字。値の範囲は 0 (包括的) から 2 pi (排他的) です。

*point1* または *point2* が空のポイントの場合は、エラーが返されます。

*point1* または *point2* のいずれかが null の場合、null が返されます。

*point1* および *point2* が等しい場合、null が返されます。

*point1* または *point2* がポイントでない場合、エラーが返されます。

*geom1* および *geom2* に空間リファレンスシステム識別子 (SRID) の値がない場合、エラーが返されます。

## 例
<a name="ST_Azimuth-function-examples"></a>

次の SQL は、入力ポイントの方位角を返します。

```
SELECT ST_Azimuth(ST_Point(1,2), ST_Point(5,6));
```

```
st_azimuth
-------------------
 0.7853981633974483
```