<br><br><div><span class="gmail_quote">On 7/4/07, <b class="gmail_sendername">Webb Sprague</b> <<a href="mailto:webb.sprague@gmail.com">webb.sprague@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You might want to look into the "centroid" function. I am not sure if<br>that is the best, but it is useful in general.</blockquote><div><br>Sorry ! I forgot to mention the centroid function in my post. <br><br>
But my main question is, what is the syntax for the centriod function when using a lot of points? Do I use multipoint?<br> <br> UPDATE table SET coords = CENTROID(geometryfromtext(' MULTIPOINT( $lat1 $long1, $lat2 $long2, $lat3 $long3)', 4326))
<br><br>?<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">W<br><br>On 7/4/07, Steve Lefevre <<a href="mailto:lawpoop@gmail.com">
lawpoop@gmail.com</a>> wrote:<br>> Hello all -<br>><br>> I'm working on a database with GIS data. In my table, I have columns for<br>> latitude, longitude, and coordinates, which is the Postgis geometry data
<br>> type. What I would like to do is find the midpoint or 'average' for any<br>> group of points.<br>><br>> I have the latitude and longitude, and then I use this syntax to create the<br>> coordinates column value:
<br>><br>> UPDATE table SET coords = geometryfromtext('POINT( longitude latitude )',<br>> 4326)<br>><br>> ( 4326 is the projection value that I understand is useful in the United<br>> States.<br>
><br>> So now that I have a bunch of lats, longs, and coordinates, I need to find<br>> the center point for any group of them. I can do a select query to get the<br>> specific records I'm looking for, and then I can have the list of lat&long
<br>> points, or the coordinate geometry. How then do I take those rows and create<br>> an SQL st<br>><br>><br>> UPDATE table SET coords = geometryfromtext(' MULTIPOINT( $lat1 $long1,<br>> $lat2 $long2, $lat3 $long3)', 4326)
<br>><br>> Can I use the 'coords' geometry object instead?<br>><br>><br>><br>> --<br>> "Computers are useless. They can only give you answers"<br>> -- Pablo Picasso<br>> _______________________________________________
<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br>><br></blockquote></div><br><br clear="all"><br>-- <br>"Computers are useless. They can only give you answers"<br>-- Pablo Picasso