google-site-verification=ECX1M6_Vb39ty4VtQDXQce6wOjmPTxSettd3hTIZb9Q

How to convert latitude and longitude to Geometry Point in Postgres?

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)

How to convert latitude and longitude to Geometry Point in Postgres? Reviewed by Ravi Kumar on 10:57 AM Rating: 5

No comments:

All Rights Reserved by Etechpulse © 2012 - 2017

Contact Form

Name

Email *

Message *

Powered by Blogger.