[pgpointcloud] Patch min and max

Éric Lemoine eric.lemoine at oslandia.com
Fri Jun 1 04:28:44 PDT 2018


On Thu, 2018-05-31 at 13:46 +0000, Lars wrote:
> Hello,
> 
> The below query takes 1,46 seconds using table with 50 000 patches
> and at least 5 seconds using table with 160 000 patches.
> "select id, PC_PatchMin(pa, 'x'), PC_PatchMax(pa,
> 'x'),PC_PatchMin(pa, 'y'), PC_PatchMax(pa, 'y') from importdata;"


If you also use PostGIS you can try the following query:

select st_xmin(e.geom), st_xmax(e.geom),
       st_ymin(e.geom), st_ymax(e.geom)
from importdata, pc_envelopegeometry(importdata.pa) e(geom);

I have hope that it is more effective.


-- 
É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/20180601/440e9314/attachment.sig>


More information about the pgpointcloud mailing list