On 7/4/07, Webb Sprague <[EMAIL PROTECTED]> wrote:
You might want to look into the "centroid" function. I am not sure if
that is the best, but it is useful in general.
Sorry ! I forgot to mention the centroid function in my post.
But my main question is, what is the syntax for the centriod function when
using a lot of points? Do I use multipoint?
UPDATE table SET coords = CENTROID(geometryfromtext(' MULTIPOINT( $lat1
$long1, $lat2 $long2, $lat3 $long3)', 4326))
?
W
On 7/4/07, Steve Lefevre <[EMAIL PROTECTED]> wrote:
> 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
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
--
"Computers are useless. They can only give you answers"
-- Pablo Picasso
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users