How to convert latitude and longitude to Geometry Point in Postgres?
Postgis longitude, latitude to geometry postgresql
Here I will show how to convert latitude, longitude into geometry format and insert it in PostgreSQL. Using ST_GeomFromText() function we get the geometry data in PostgreSQL.
Convert Latitude and Longitude to Geometry
- ST_GeomFromText('POINT(" + Longitude + " " + Latitude + ")',4326)
Update geometry column with SRID
- update stores set sp_geometry = ST_GeomFromText('POINT('||lng||' '|| lat||')',4326)
How to convert latitude and longitude to Geometry Point in Postgres?
Reviewed by Ravi Kumar
on
10:57 AM
Rating:

No comments: