[postgis-users] noob question

Steve Lefevre lawpoop at gmail.com
Wed Jul 4 11:04:45 PDT 2007


Hello all -

I'm working on a database with GIS data. In my table,  I have columns for
latitude, longitude, and coordinates, which is the Postgis geometry data
type. What I would like to do is find the midpoint or 'average' for any
group of points.

I have the latitude and longitude, and then I use this syntax to create the
coordinates column value:

UPDATE table SET coords =  geometryfromtext('POINT( longitude latitude )',
4326)

( 4326 is the projection value that I understand is useful in the United
States.

So now that I have a bunch of lats, longs, and coordinates, I need to find
the center point for any group of them. I can do a select query to get the
specific records I'm looking for, and then I can have the list of lat&long
points, or the coordinate geometry. How then do I take those rows and create
an SQL st


UPDATE table SET coords = geometryfromtext(' MULTIPOINT( $lat1 $long1,
$lat2 $long2, $lat3 $long3)', 4326)

Can I use the 'coords' geometry object instead?



-- 
"Computers are useless. They can only give you answers"
-- Pablo Picasso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070704/6f5b5b9e/attachment.html>


More information about the postgis-users mailing list