[pdal] How to calculate point cloud density?

Ulises Ibarra ulisesmartinibarra at gmail.com
Sun Jan 7 08:33:33 PST 2024


Hi Howard:
I run some like this, and look like it works:
[
     {
         "type":"readers.las",

 "filename":"cloud6cb301139efa9d25_GGM2010_scale_offset_translated.las"
     },
     {
         "type":"writers.gdal",

 "filename":"cloud6cb301139efa9d25_GGM2010_scale_offset_translated_densidad1m2.tif",
         "dimension":"Z",
         "data_type":"Float32",
         "binmode":true,
         "output_type":"count",
         "resolution":1
     }
     ]

what do you think?

El dom, 7 ene 2024 a las 9:34, Ulises Ibarra (<ulisesmartinibarra at gmail.com>)
escribió:

> Hi Howard, thanks for replying.
> When applying the pipeline that you show me, the result is on the one hand:
> 1.- (pdal_2.6) C:\clouds\quarry>pdal pipeline
> pipeline_densidad_hexagonos.json
> PDAL: filters.hexbin: Unexpected argument 'density'
>
> I did something that is probably not right:
> "pipeline": [
>       {
>           "type":"readers.las",
>           "filename":"odm_georeferenced_model.laz"
>       },
>        {
>           "type":"filters.hexbin.density",
>           "edge_length":10,
>           "filename":"hexagons-are-awesome.shp"
>        }
>        ]
>
> And the result was:
> "PDAL: Couldn't create filter stage of type 'filters.hexbin.density'.
> You probably have a version of PDAL that didn't come with a plugin
> you're trying to load. Please see the FAQ at https://pdal.io/faq.html"
>
> On the other hand, using the same example pipeline that you kindly showed
> me:
> 2.- The resulting TIF raster has 3 bands and apparently shows elevation,
> not density. Probably because the pipeline includes this: "dimension":"Z".
>
> What could I do about it?
>
> Cordially
>
> Ulises Ibarra
>
> El vie, 5 ene 2024 a las 15:55, Howard Butler (<howard at hobu.co>) escribió:
>
>>
>>
>> > On Jan 4, 2024, at 4:50 PM, Ulises Ibarra via pdal <
>> pdal at lists.osgeo.org> wrote:
>>
>> If you don't need the hexagons, use writers.gdal.binmode=true and then
>> capture the 'count' band from that raster. It should run quickly and you
>> can control the pixel size.
>>
>> The following pipeline does both:
>>
>> > "pipeline":[
>> >     {
>> >         "type":"readers.las",
>> >         "filename":"myfile.laz"
>> >     },
>> >     {
>> >         "type":"filters.hexbin",
>> >         "edge_length":10,
>> >         "density":"hexagons-are-awesome.shp"
>> >     },
>> >     {
>> >         "type":"writers.gdal",
>> >         "filename":"output.tif",
>> >         "dimension":"Z",
>> >         "data_type":"Float32",
>> >         "binmode":true,
>> >         "output_type":"count",
>> >         "resolution": 1
>> >     }
>> >   ]
>> > }
>>
>>
>>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20240107/5e3418b7/attachment.htm>


More information about the pdal mailing list