[postgis-devel] Try before you Buy

Paul Ramsey pramsey at opengeo.org
Wed Jan 21 21:01:32 PST 2009


All the pieces of the new super-fast cascaded geometry are now in SVN.
You'll need an absolutely fresh copy of GEOS to use them, but once you
do, you can run something like this:

aggtest=# select
geometrytype(_unite_garray_fast(st_geometryarray(the_geom))) from
sample_poly;
       geometrytype --------------
 MULTIPOLYGON
(1 row)
Time: 23267.905 ms


note that
 st_union() is still bound against the oldest implementation
 st_union_fast() is bound against an implementation with slow
aggregation but fast GEOS union
 _unite_garray_fast(st_geometryarray()) is the only way to get the
ultimate speed right now

Unfortunately, it looks I'm going to need a special finalfunc for
every single aggregate that takes in the internal pointer to the
side-cache. That makes all the aggregates less pretty, since they
won't use function(geometry[]) as their finalfunc anymore. The
cleanest way would be to have those finalfuncs do little more than
call other functions.

Mark, is there a prescribed way to call postgresql functions (ones
with (PG_FUNCTION_ARGS) as the argument) from other internal
functions?

Paul



More information about the postgis-devel mailing list