ST_GeogFromText — Ritorna un valore geography sotto forma di Well-Know-Text (WKT) oppure di Extended-Well-Know-Text (EWKT)
geography ST_GeogFromText(text EWKT);
Restituisce un oggetto geografico dal testo noto o dalla rappresentazione nota estesa. Se non specificato, viene assunto il codice SRID 4326. Si tratta di un alias di ST_GeographyFromText. I punti sono sempre espressi in long lat.
Add a WGS 84 geography point column to a table.
ALTER TABLE sometable ADD COLUMN geog geography(POINT, 4326);
Populate the geography column from longitude and latitude columns.
UPDATE sometable
SET geog = ST_GeogFromText('SRID=4326;POINT(' || lon || ' ' || lat || ')');
Specify a geography point using EPSG:4267, NAD27.
SELECT ST_GeogFromText('SRID=4267;POINT(-77.0092 38.889588)');
SRID=4267;POINT(-77.0092 38.889588)