제목

ST_GeogFromText — WKT (확장) 표현식으로부터 지정된 지리형 값을 반환합니다.

요약

geography ST_GeogFromText(text EWKT);

설명

WKT 표현식 또는 확장 WKT 표현식으로부터 지리형 객체를 반환합니다. 투영체를 따로 설정하지 않은 경우 SRID 4326으로 가정합니다. 이 함수는 ST_GeographyFromText와 동일합니다. 포인트는 항상 경위도 형식으로 표현됩니다.

예시

Add a WGS 84 geography point column to a table.

Code
ALTER TABLE sometable ADD COLUMN geog geography(POINT, 4326);

Populate the geography column from longitude and latitude columns.

Code
UPDATE sometable
SET geog = ST_GeogFromText('SRID=4326;POINT(' || lon || ' ' || lat || ')');

Specify a geography point using EPSG:4267, NAD27.

Code
SELECT ST_GeogFromText('SRID=4267;POINT(-77.0092 38.889588)');
래스터 출력
SRID=4267;POINT(-77.0092 38.889588)
Figure
Geometry figure for visual-st-geogfromtext-01