[postgis-users] noob question

Steve Lefevre lawpoop at gmail.com
Wed Jul 4 11:20:06 PDT 2007


On 7/4/07, Brent Wood <pcreso at pcreso.com> wrote:
>
>
> Hi Steve,
>
> Hope this helps...
>
> If I understand you correctly, this may be easier outside of PostGIS
> geometries, try:
>
> select geometryfromtext(('POINT( avg(longitude) avge(latitude) ',4326)
> group by ....
>
> Always assuming the avg() is a appropriate value to use for your purposes.



I guess I was under the idea that avg() functions don't quite work in
geography for latitude and longitude. Is this not the case?



If you didn't have the lat/long values outside a POINT geometry column, the
> same result would be achieved by:
>
> select geometryfromtext(('POINT( avg(X(coords)) avg(Y(coords)) ',4326)
> group by...
>
>
>
>
> Cheers,
>
>    Brent Wood
>
>
> > 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
> > > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
>


-- 
"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/f549d033/attachment.html>


More information about the postgis-users mailing list