ST_ShiftLongitude — ジオメトリの座標値を-180度から180度の範囲と0度から360度の範囲に揃えます。
geometry ST_ShiftLongitude(
geometry geomA)
;
全てのポイント/頂点を読み、経度が0未満なら360を足します。0から360までの範囲で、180度を中心としたマップにプロットされるデータが返ります。
![]() | |
この関数は、SRID 436 (WGS84地理座標系)のような緯度経度の座標値を持つデータの場合に限って使います。 |
![]() | |
1.3.4より前ではMULTIPOINTでは動作しないバグがありました。1.3.4以上ではMULTIPOINTでも動作します。 |
This function supports 3d and will not drop the z-index.
Enhanced: 2.0.0 多面体サーフェス対応とTIN対応が導入されました。
ご注意: この関数は2.0.0で"ST_Shift_Longitude"から名称変更しました。
This function supports Polyhedral surfaces.
This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
-- 3次元ポイント SELECT ST_AsEWKT(ST_ShiftLongitude(ST_GeomFromEWKT('SRID=4326;POINT(-118.58 38.38 10)'))) As geomA, ST_AsEWKT(ST_ShiftLongitude(ST_GeomFromEWKT('SRID=4326;POINT(241.42 38.38 10)'))) As geomb geomA geomB ---------- ----------- SRID=4326;POINT(241.42 38.38 10) SRID=4326;POINT(-118.58 38.38 10) -- 標準的なラインストリング SELECT ST_AsText(ST_ShiftLongitude(ST_GeomFromText('LINESTRING(-118.58 38.38, -118.20 38.45)'))) st_astext ---------- LINESTRING(241.42 38.38,241.8 38.45)