« Return to Thread: using columns as POINT objects parameters

Re: dynamic point values

by Michael Fuhr :: Rate this Message:

Reply to Author | View in Thread

On Sun, Nov 26, 2006 at 03:47:54PM -0800, kidult wrote:
> what is the correct syntax for using columns as parameters for the POINT
> object?

You can use MakePoint():

SELECT latitude, longitude, AsText(MakePoint(longitude, latitude))
FROM test;

  latitude  |  longitude  |            astext            
------------+-------------+-------------------------------
 44.3475481 | -73.6287475 | POINT(-73.6287475 44.3475481)
(1 row)

Geometry coordinates are (X, Y) so use (longitude, latitude) instead
of (latitude, longitude).


--
Michael Fuhr
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

 « Return to Thread: using columns as POINT objects parameters