[postgis-users] Computing a centroid on GEOGRAPHY objects

Ed Linde edolinde at gmail.com
Thu Dec 6 13:21:13 PST 2012


Yeah, but doesn't that need a spatial reference ID? Or would it
automatically know what to do?


On Thu, Dec 6, 2012 at 9:40 PM, Michal Zimmermann <zimmicz at gmail.com> wrote:

> You can try to cast geography to geometry with
> ST_Centroid(geography_column::geometry).
>
> On 12/6/12, Ed Linde <edolinde at gmail.com> wrote:
> > Hi All,
> > I have a huge bunch of scattered lat/long coordinates stored as GEOGRAPHY
> > type. I would now like to cluster some of them and
> > compute their centroids.
> > I know there is a centroid computation function in Postgis, but it seems
> to
> > only work on a geometry type.
> > The lat/long coordinates are spread all across the globe and hence I
> cannot
> > convert it to local UTM formats because there is a discrepancy when going
> > across different zones!
> > Any workarounds?
> >
> > Thanks,
> > Ed
> >
>
>
> --
> Michal Zimmermann (zimmi)
> WWW: http://www.zimmi.cz
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121206/ad14fbd6/attachment.html>


More information about the postgis-users mailing list