[pgpointcloud] interest in PC_PatchSum(p, dimname) ?

Éric Lemoine eric.lemoine at oslandia.com
Fri Jun 29 00:53:49 PDT 2018


On Thu, 2018-06-28 at 21:41 -0400, Karl Pietrzak wrote:
> I was wondering if there was any interest in a function:
> 
> PC_PatchSum(p pcpatch, dimname text) returns numeric
> 
> We're curious how specific it is to our use cases, or if others would
> benefit.  We can send a pull request.
> 

Not sure you will get the level of performance you expect but you can
do something like this already:

select patch_id, sum(pc_get(pt, 'NumberOfReturns')) from
  (select id as patch_id, pc_explode(points) as pt from inrap) _
group by patch_id;

I would'nt be opposed to adding PC_PatchSum, but that would mean
extending the PCSTATS structure.


-- 
Éric Lemoine
Oslandia
+33 1 86 95 95 55
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20180629/0c7d5fd5/attachment.sig>


More information about the pgpointcloud mailing list