STV_Geometry
将 GEOGRAPHY 对象转换为 GEOMETRY 对象。
SRID 值不影响 Vertica Place 查询的结果。
行为类型
不可变语法
STV_Geometry( geog )
参数
geog
- 要转换为 GEOMETRY 对象的空间对象,类型为 GEOGRAPHY
返回
GEOMETRY
支持的数据类型
示例
以下示例显示了 STV_Geometry 的用法。
将 GEOGRAPHY 值转换为 GEOMETRY 值,然后将结果转换回 GEOGRAPHY 类型:
=> CREATE TABLE geogs(g GEOGRAPHY);
CREATE TABLE
=> COPY geogs(gx filler LONG VARCHAR, geog AS ST_GeographyFromText(gx)) FROM stdin delimiter '|';
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
>> MULTIPOINT(-108.619726 45.000284,-107.866813 45.00107,-106.363711 44.994223,-70.847746 41.205814)
>> \\.
=> SELECT ST_AsText(STV_Geography(ST_Centroid(STV_Geometry(g)))) FROM geogs;
ST_AsText
--------------------------------
POINT (-98.424499 44.05034775)