<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello Neil and Regina</div><div><br data-mce-bogus="1"></div><div>For your application, I would use the <span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">"</span><span data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255); float: none; display: inline !important;">foreign key to a separate table of plane equations" approach you proposed :</span></div><div>- create a new schema with an added plane id column to the current pcpatch schema </div><div>- use the PC_SetPCId  function <span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">(or PC_Transform if you changed existing columns) </span>with this new schema on the patches to get a default assignment (default = unassigned = outlier point)</div><div>- iterate over the patches to assign a new plane id to outlier points that are inliers of the new RANSAC extracted plane</div><div><br></div><div>For the plane assignment modification in the last step, a possibility is to do something like :</div><div>- PC_Explode the patch</div><div>- PC_Get each point to get the float8[] array of values</div><div>- modify the plane id value in the array if it is an inlier of the new plane</div><div>- PC_MakePoint to create the modified point</div><div>- PC_Patch to reaggregate the points into a patch</div><div><br data-mce-bogus="1"></div><div>Best,</div><div>Mathieu</div><div><br data-mce-bogus="1"></div><div>PS: maybe we should consider implementing functions like the following to simplify point and patch modifications :</div><div><div><strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">- PC_Set(pa pcpatch, dimname text,<span> </span>n int4,<span> </span>val<span> </span><span data-mce-style="color: #404040; font-family: Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #fcfcfc; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(64, 64, 64); font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">float8</span></strong><strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">)</strong><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"> </span><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">returns</span><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span> <strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">pcpatch</strong></span></span><div data-mce-style="clear: both;" style="clear: both;"><strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">- PC_Set(pt pcpoint, dimname text, val<span> </span><span data-mce-style="color: #404040; font-family: Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #fcfcfc; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(64, 64, 64); font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">float8</span></strong><strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">)</strong><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"> </span><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline !important;">returns</span><span data-mce-style="color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><span> </span><strong data-mce-style="box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);" style="color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; box-sizing: border-box; font-weight: var(--base-text-weight-semibold, 600);">pcpoint</strong></span><div data-mce-style="clear: both;" style="clear: both;"><br></div></div></div></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Neil Underhill" <neil.underhill@gmail.com><br><b>À: </b>"Regina Obe" <lr@pcorp.us><br><b>Cc: </b>pgpointcloud@lists.osgeo.org<br><b>Envoyé: </b>Mercredi 28 Juin 2023 10:34:55<br><b>Objet: </b>Re: [pgpointcloud] How to create a PcPoint table in PostGIS?<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello all,<br><div>A follow on question to the below... is it possible to add an additional column to data stored as a pgPointcloud ?</div><div>Reason I ask is that I am using the RANSAC algorithm to detect roof shapes (i.e. which Cartesian equation of a plane fits the most points). </div><div>Currently the algorithm will only find the plane equation which fits the biggest number of points in a point cloud. However there is usually more than one roof in a point cloud, so I would like to add a column to indicate that a point already belongs to a plane so the algorithm can exclude, re-reun and find the next biggest biggest plane, etc. etc., until a minimum threshold in area is reached.  </div><div>I am thinking the new column should be either a binary flag, or a foreign key to a separate table of plane equations. </div><div>If the above is not possible, then I would assume that I need to dump out the pgPointcloud into a standard PostGIS point geometry table, where I can add additional column? </div><br><div>Thanks,<br>Neil</div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 Mar 2023 at 21:08, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank" rel="nofollow noopener noreferrer">lr@pcorp.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex"><div class="msg-8072085519394452931"><div lang="EN-US"><div class="m_-8072085519394452931WordSection1"><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">You can use the PC_Explode function to access individual points.  It converts a patch into individual PcPoints.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><a href="https://pgpointcloud.github.io/pointcloud/functions/patchs.html#pc-explode" target="_blank" rel="nofollow noopener noreferrer">https://pgpointcloud.github.io/pointcloud/functions/patchs.html#pc-explode</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">You can use the PC_PointN to access individual points by index number in the patch.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><a href="https://pgpointcloud.github.io/pointcloud/functions/patchs.html#pc-pointn" target="_blank" rel="nofollow noopener noreferrer">https://pgpointcloud.github.io/pointcloud/functions/patchs.html#pc-pointn</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">So for example to pick at random 3 points, you can do something like (NOT TESTED)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">SELECT PC_PointN(pa, index) AS pcp<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">FROM patches AS p,  PC_NumPoints(<a href="http://p.pa" target="_blank" rel="nofollow noopener noreferrer">p.pa</a>) AS np<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">CROSS JOIN LATERAL (SELECT index FROM generate_series(1, np) AS index ORDER BY random() LIMIT 3) AS pi(index);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">Hope that helps,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )">Regina<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:'calibri' , sans-serif;color:rgb( 31 , 73 , 125 )"><u></u> <u></u></span></p><div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt"><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb( 225 , 225 , 225 );padding:3pt 0in 0in"><p class="MsoNormal"><b><span style="font-size:11pt;font-family:'calibri' , sans-serif">From:</span></b><span style="font-size:11pt;font-family:'calibri' , sans-serif"> pgpointcloud [mailto:<a href="mailto:pgpointcloud-bounces@lists.osgeo.org" target="_blank" rel="nofollow noopener noreferrer">pgpointcloud-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Neil Underhill<br><b>Sent:</b> Tuesday, March 28, 2023 12:47 PM<br><b>To:</b> <a href="mailto:pgpointcloud@lists.osgeo.org" target="_blank" rel="nofollow noopener noreferrer">pgpointcloud@lists.osgeo.org</a><br><b>Subject:</b> [pgpointcloud] How to create a PcPoint table in PostGIS?<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">I have a .laz file with about 51m points in it  (225 MB in size), and want to run a RANSAC algorithm to detect roof planes. <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I would like to add the LIDAR data to a PostGIS database so I can interact with other geospatial layers (e.g. use a mask to filter the points to consider) and also access individual points to input into the algorithm. <u></u><u></u></p></div><div><p class="MsoNormal">I have been following the information here (<a href="https://pgpointcloud.github.io/pointcloud/concepts/objects.html" target="_blank" rel="nofollow noopener noreferrer">https://pgpointcloud.github.io/pointcloud/concepts/objects.html</a>) about the different Point Cloud Objects. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">My question is, if I store the data as a PcPatch, will I be able to access the individual points (e.g. select three points at random, that may or may not be in the same patch) ? <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">If not, it seems I will need to store as PcPoint. If it's the latter, I am not clear how I create a database with PcPoint objects, as the example in the Quickstart (<a href="https://pgpointcloud.github.io/pointcloud/quickstart.html" target="_blank" rel="nofollow noopener noreferrer">https://pgpointcloud.github.io/pointcloud/quickstart.html</a>) only creastes a PcPatch table.  <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks for any advice,<u></u><u></u></p></div><div><p class="MsoNormal">Neil<u></u><u></u></p></div></div></div></div></div></div></blockquote></div></div></div>
<br>_______________________________________________<br>pgpointcloud mailing list<br>pgpointcloud@lists.osgeo.org<br>https://lists.osgeo.org/mailman/listinfo/pgpointcloud<br></div></div></body></html>