Latest

random

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, Longitude to Geography Point,Geometry

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)

No comments:

All Rights Reserved by Etechpulse © 2015 - 2016
Powered By Blogger

Contact Form

Name

Email *

Message *

Powered by Blogger.