<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: rgb(255, 255, 255);">My pipeline with overlay:</span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: rgb(255, 255, 255);">Attribute "class" in the shapefile is "64".</span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"><span style="background-color: rgb(255, 255, 255);"> </span></div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">[<br> "A04.08.1-1___231129_1515_HESAI_3_0000.laz",<br> <br> {<br> "type":"filters.overlay",<br> "dimension":"Classification",<br> "datasource":"Buffers.shp",<br> "column":"class"<br> },<br> <br> {<br> "type":"filters.range",<br> "limits":"Classification[64:64]"<br> },<br> {<br> "type":"filters.locate",<br> "dimension": "Z",<br> "minmax": "max"<br> },</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> {<br> "type":"writers.text",<br> "order":"X,Y,Z",<br> "filename":"A04.08.1-1___231129_1515_HESAI_3_0000_verticality_0.90_dbscan_max_points_overlay.txt"<br> }<br>]</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">My pipeline with crop:</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">[<br> "A04.08.1-1___231129_1515_HESAI_3_0000.laz",<br> <br> {<br> "type":"filters.crop",<br> "polygon":["Polygon((610081.68134172109421343 5334446.55763604305684566, 610081.67644737276714295 5334446.52673434372991323, 610081.66224342060741037 5334446.49885751772671938, 610081.64012024633120745 5334446.47673434391617775, 610081.61224342056084424 5334446.46253039129078388, 610081.58134172111749649 5334446.45763604342937469, 610081.55044002167414874 5334446.46253039129078388, 610081.52256319590378553 5334446.47673434391617775, 610081.50044002162758261 5334446.49885751772671938, 610081.48623606946785003 5334446.52673434372991323, 610081.48134172114077955 5334446.55763604305684566, 610081.48623606946785003 5334446.5885377423837781, 610081.50044002162758261 5334446.61641456838697195, 610081.52256319590378553 5334446.63853774219751358, 610081.55044002167414874 5334446.65274169482290745, 610081.58134172111749649 5334446.65763604268431664, 610081.61224342056084424 5334446.65274169482290745, 610081.64012024633120745 5334446.63853774219751358, 610081.66224342060741037 5334446.61641456838697195, 610081.67644737276714295 5334446.5885377423837781, 610081.68134172109421343 5334446.55763604305684566))" ... some more polyons...,)"]<br> },<br> {<br> "type":"filters.locate",<br> "dimension": "Z",<br> "minmax": "max"<br> },</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> {<br> "type":"writers.text",<br> "order":"X,Y,Z",<br> "filename":"A04.08.1-1___231129_1515_HESAI_3_0000_verticality_0.90_dbscan_max_points.txt"<br> }<br>]</div>
</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">Output overlay:</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">"X","Y","Z","Intensity","ReturnNumber","NumberOfReturns","ScanDirectionFlag","EdgeOfFlightLine","Classification","Synthetic","KeyPoint","Withheld","Overlap","ScanAngleRank","UserData","PointSourceId","GpsTime"<br>610267.519,5334305.548,212.964,256.000,1.000,1.000,0.000,0.000,64.000,0.000,0.000,0.000,0.000,0.000,0.000,6.000,310579.939</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">Output crop: </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">"X","Y","Z","Intensity","ReturnNumber","NumberOfReturns","ScanDirectionFlag","EdgeOfFlightLine","Classification","Synthetic","KeyPoint","Withheld","Overlap","ScanAngleRank","UserData","PointSourceId","GpsTime"<br>610081.562,5334446.585,211.776,256.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,10.000,310565.693<br>610084.968,5334442.840,211.720,512.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,3.000,310566.043<br>610088.363,5334439.146,211.559,1024.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,18.000,310566.294<br>610091.731,5334435.591,211.878,256.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,20.000,310566.593<br>610095.331,5334431.894,212.196,1536.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,26.000,310566.892<br>610098.764,5334428.382,211.547,512.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,4.000,310567.294<br>610102.208,5334424.824,211.695,1280.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,19.000,310567.543<br>610105.778,5334421.205,211.471,512.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,23.000,310567.844<br>610109.456,5334417.722,211.970,256.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,15.000,310568.193<br>610112.953,5334414.379,211.739,1024.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,3.000,310568.543<br>610116.518,5334410.726,211.401,768.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,19.000,310568.794<br>610120.157,5334407.408,211.996,1024.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,8.000,310569.142<br>610123.993,5334404.056,211.787,256.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,11.000,310569.443<br>610127.581,5334400.697,212.215,1792.000,1.000,1.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,24.000,310569.692</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">... and many more lines.</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">The only point from the overlay output is also in the list of the crop output (not shown).</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">The WKT polygon list is derived from the shapefile.</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">Regards,</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;">Roland</div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
<div style="font-family: 'verdana'; font-size: 12px; color: #000;"> </div>
</div>
<div id="sub-body-container" style="margin: 10px 5px 5px 10px; padding: 10px 0px 10px 10px; border-left: 2px solid rgb(195, 217, 229);">
<div style="margin: 0px 0px 10px;">
<div><strong>Gesendet: </strong>Mittwoch, 2. April 2025 um 01:13</div>
<div><strong>Von: </strong>"Howard Butler" <howard@hobu.co></div>
<div><strong>An: </strong>"Roland Spielhofer" <rspiel@gmx.net></div>
<div><strong>CC: </strong>pdal@lists.osgeo.org</div>
<div><strong>Betreff: </strong>Re: [pdal] filter.crop option "ogr"</div>
</div>
What does your pipeline look like?<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote>
<div>On Mar 31, 2025, at 9:11 AM, Roland Spielhofer via pdal <pdal@lists.osgeo.org> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div style="font-family: verdana; font-size: 12.0px;">Thanks Howard for clarifying this.</div>
<div style="font-family: verdana; font-size: 12.0px;">The reason why I am trying to use filters.crop is the following:</div>
<div style="font-family: verdana; font-size: 12.0px;">I am trying to find the max(z) in each of a number of polygons.</div>
<div style="font-family: verdana; font-size: 12.0px;">I found</div>
<div style="font-family: verdana; font-size: 12.0px;"><a href="https://stackoverflow.com/questions/75907829/can-pdal-be-used-to-find-the-max-point-in-each-of-a-set-of-polygons" target="_blank" rel="noopener noreferrer">https://stackoverflow.com/questions/75907829/can-pdal-be-used-to-find-the-max-point-in-each-of-a-set-of-polygons</a></div>
<div style="font-family: verdana; font-size: 12.0px;">that exactly describes what I want to do, but I do not have the WKT geometries.</div>
<div style="font-family: verdana; font-size: 12.0px;"> </div>
<div style="font-family: verdana; font-size: 12.0px;">When I use the filters.assign and filters.expression workflow, I get only one single point, not one per polygon.</div>
<div style="font-family: verdana; font-size: 12.0px;"> </div>
<div style="font-family: verdana; font-size: 12.0px;">Is there a difference how filters.crop works compared to filters.assign/filters.expression that effects the outcome of filters.locate?</div>
<div style="font-family: verdana; font-size: 12.0px;"> </div>
<div style="font-family: verdana; font-size: 12.0px;">Regards,</div>
<div style="font-family: verdana; font-size: 12.0px;">Roland</div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div id="sub-body-container" style="margin: 10.0px 5.0px 5.0px 10.0px; padding: 10.0px 0.0px 10.0px 10.0px; border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0.0px 0.0px 10.0px;">
<div><strong>Gesendet: </strong>Montag, 31. März 2025 um 15:43</div>
<div><strong>Von: </strong>"Howard Butler" <howard@hobu.co></div>
<div><strong>An: </strong>"Roland Spielhofer" <rspiel@gmx.net></div>
<div><strong>CC: </strong>pdal@lists.osgeo.org</div>
<div><strong>Betreff: </strong>Re: [pdal] filter.crop option "ogr"</div>
</div>
Roland,
<div> </div>
<div>This feature is a 2.9.0+ thing, which has not been released yet.</div>
<div> </div>
<div><a href="https://pdal.io/en/2.8.4/stages/filters.crop.html" target="_blank" rel="noopener noreferrer">https://pdal.io/en/2.8.4/stages/filters.crop.html</a> doesn't show any 'ogr' option. You can achieve a similar outcome by using filters.assign to label points and filters.expression to cull them <a href="https://pdal.io/en/2.8.4/workshop/manipulation/clipping/clipping.html#workshop-clipping" target="_blank" rel="noopener noreferrer">https://pdal.io/en/2.8.4/workshop/manipulation/clipping/clipping.html#workshop-clipping</a></div>
<div> </div>
<div>Howard<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote>
<div>On Mar 31, 2025, at 8:40 AM, Roland Spielhofer via pdal <pdal@lists.osgeo.org> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">Hi,</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">I am trying to use the option "ogr" in filters.crop.</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">...</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">{<br> "type":"filters.crop",<br> "ogr":{<br> "type":"ogr",<br> "datasource": ["Buffers.shp"],<br> "drivers":"ESRI Shapefile"<br> }<br> },</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">...</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">When doing so, I get</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">"PDAL: filters.crop: Unexpected argument 'ogr'."</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">My version:</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">(lidar) Q:\.....\PDAL>pdal --version<br>--------------------------------------------------------------------------------<br>pdal 2.8.4 (git-version: Release)<br>--------------------</span><span style="background-color: rgb(255,255,255);">------------------------------------------------------------</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">on Windows/Conda</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">Is "ogr" already included in v2.8.4?</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);"> </span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">Thanks!</span></div>
<div style="font-family: verdana; font-size: 12.0px;"><span style="background-color: rgb(255,255,255);">Roland</span></div>
_______________________________________________<br>pdal mailing list<br>pdal@lists.osgeo.org<br><a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/pdal</a></div>
</blockquote>
</div>
</div>
</div>
_______________________________________________<br>pdal mailing list<br>pdal@lists.osgeo.org<br><a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/pdal</a></div>
</blockquote>
</div>
</div>