I would like to make a POINT using the longitude and latitude columns of an existing table.
Here's a link to the documentation of ST_MakePoint.
Here's my table:
CREATE TABLE sysinst.bio (
oid INTEGER PRIMARY KEY,
longitude FLOAT,
latitude FLOAT,
geom GEOMETRY(POINT, 26913)
);
Adding Geometry Column:
SELECT AddGeometryColumn ('sysinst', 'bio', 'geom', 26913, 'POINT', 2);
Here's my query:
UPDATE sysinst.bio SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 26913);
No returned error though the POINTS are wrongly plotted when viewed in QGIS.
For (-97.5959, 21.1922)
, I recieve (-109.4896, 0.0002)
Any suggestions?
I'm open to doing this more efficiently if there's an easier way.