How to insert long/lat value in postgis database in the form of Point(x,y)?

المشرف العام

Administrator
طاقم الإدارة
I am having some trouble in inserting long/lat in the form of point. Currently, I have array of long/lat value and which I want to store into database in the form of point. However, I am unable to store it in the form of point and when I query as ST_AsText(geom), I simply get long/lat value not a point.

In the picture below, the bottom one is my output where point and long/lat are same but what I want to achieve is the top query output.

Insert code:

INSERT INTO point_route(ID, ROUTE_NAME, geom) VALUES (1, 'point 1', ST_SetSRID(ST_makepoint(27.71595, 85.28364),900913));



أكثر...
 
أعلى