CartoDB / crankshaft

CARTO Spatial Analysis extension for PostgreSQL
BSD 3-Clause "New" or "Revised" License
54 stars 20 forks source link

Polygon and linestring support in CDB_WeightedMean #79

Open rochoa opened 8 years ago

rochoa commented 8 years ago

CDB_WeightedMean only understand points (due to ST_X/ST_Y) right now.

cc @ohasselblad @stuartlynn @javisantana

andy-esch commented 8 years ago

The most straight forward way I can see to support polygons and linestrings is to use ST_Centroid which gets the center of mass of the geometries, and then use the ST_X/ST_Y as normal

stuartlynn commented 8 years ago

Hey @rochoa do we have a good usecase for lines or polygons?