New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST_ConvexHullAgg #464
ST_ConvexHullAgg #464
Conversation
☝️ @robe2 |
OK, ran some tests against this, and the performance is terrible (10x worse than
|
/* Single point is always convex */ | ||
case POINTTYPE: | ||
return LW_TRUE; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is TRIANGLE convex in context of this function?
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL; | ||
|
||
-- Availability: 3.0.0 | ||
CREATE AGGREGATE ST_ConvexHullAgg (geometry) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the
final func be "ST_ConvexHull(geometry[])",
stype = internal (LWGEOM* geometrycollection),
sfunc = try{ append(LWGEOM) } except Out of Memory { ST_ConvexHull(LWGEOM), append(LWGEOM) },
serialfunc -> geometry_serialize(ST_ConvexHull(LWGEOM)),
deserialfunc -> gserialized parse?
This should make it catch up with ST_ConvexHull(ST_Collect()) speed.
Should we give up on this as hopeless? Only real reason for having it is if it could be faster than ST_ConvexHull(ST_Collect(..)). If it can't then the extra keystrokes is not worth the addition of a new agg. |
I'm closing this one out as I think we decided it's hopeless |
As described in https://trac.osgeo.org/postgis/ticket/3770,
Take in a set of geometry and return convex full of full set.