[postgis-users] dynamic point values
Michael Fuhr
mike at fuhr.org
Sun Nov 26 19:04:22 PST 2006
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
More information about the postgis-users
mailing list