ST_GeogFromText — 从已知文本表示或扩展 (WKT) 中返回一个指定的地图值。
geography ST_GeogFromText(
text EWKT)
;
--- converting lon lat coords to geography ALTER TABLE sometable ADD COLUMN geog geography(POINT,4326); UPDATE sometable SET geog = ST_GeogFromText('SRID=4326;POINT(' || lon || ' ' || lat || ')'); --- specify a geography point using EPSG:4267, NAD27 SELECT ST_AsEWKT(ST_GeogFromText('SRID=4267;POINT(-77.0092 38.889588)'));