<br><br><div><span class="gmail_quote">On 7/4/07, <b class="gmail_sendername">Brent Wood</b> &lt;<a href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Steve,<br><br>Hope this helps...<br><br>If I understand you correctly, this may be easier outside of PostGIS<br>geometries, try:<br><br>select geometryfromtext((&#39;POINT( avg(longitude) avge(latitude) &#39;,4326)
<br>group by ....<br><br>Always assuming the avg() is a appropriate value to use for your purposes.</blockquote><div><br><br>I guess I was under the idea that avg() functions don&#39;t quite work in geography for latitude and longitude. Is this not the case?
<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;">If you didn&#39;t have the lat/long values outside a POINT geometry column, the
<br>same result would be achieved by:<br><br>select geometryfromtext((&#39;POINT( avg(X(coords)) avg(Y(coords)) &#39;,4326)<br>group by...<br><br><br><br><br> Cheers,<br><br>&nbsp;&nbsp; Brent Wood<br><br><br>&gt; UPDATE table SET coords =&nbsp;&nbsp;geometryfromtext(&#39;POINT( longitude latitude )&#39;,
<br>&gt; 4326)<br>&gt;<br>&gt; ( 4326 is the projection value that I understand is useful in the United<br>&gt; States.<br>&gt;<br>&gt; So now that I have a bunch of lats, longs, and coordinates, I need to find<br>&gt; the center point for any group of them. I can do a select query to get the
<br>&gt; specific records I&#39;m looking for, and then I can have the list of lat&amp;long<br>&gt; points, or the coordinate geometry. How then do I take those rows and create<br>&gt; an SQL st<br>&gt;<br>&gt;<br>&gt; UPDATE table SET coords = geometryfromtext(&#39; MULTIPOINT( $lat1 $long1,
<br>&gt; $lat2 $long2, $lat3 $long3)&#39;, 4326)<br>&gt;<br>&gt; Can I use the &#39;coords&#39; geometry object instead?<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; &quot;Computers are useless. They can only give you answers&quot;
<br>&gt; -- Pablo Picasso<br>&gt; &gt; _______________________________________________<br>&gt; postgis-users mailing list<br>&gt; <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br>&gt; <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>&gt;<br><br></blockquote></div><br><br clear="all"><br>-- <br>&quot;Computers are useless. They can only give you answers&quot;
<br>-- Pablo Picasso