0

I have geojson file with polygons of tree locations and labels "Tree" (~5,300 polygons). And point cloud made from aerial images and points have extra information "HeightAboveGround" I got using PDAL filters.hag_dem.

I want to get maximum value of "HeightAboveGround" inside every polygon and change the label of polygon to "sapling" if "HeightAboveGround" value is under 2. I am also fine with only saving maximum "HeightAboveGround" points to new las/laz file.

So far, I have tried using this PDAL pipeline. I have the following pipeline:

[
    {
        "type":"readers.las",
        "filename":"input.las",
        "use_eb_vlr":"true"
    },
    {
        "type":"filters.overlay",
        "dimension":"Classification",
        "datasource":"trees.geojson",
        "query":"SELECT FID, * from trees",
        "column":"FID"
    },
    {
        "type":"filters.groupby",
        "dimension":"Classification"
    },
    {
        "type":"filters.locate",
        "dimension":"HeightAboveGround",
        "minmax":"max"
    },
    {
        "type":"filters.merge"
    },
    {
        "type":"writers.las",
        "filename":"trees.las",
        "forward":"all"
    }
]

Here is the debug log:

(PDAL Debug) Debugging...
(pdal pipeline readers.las Debug) Using GeoTIFF VLR
(pdal pipeline readers.las Debug)                       Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GTCitationGeoKey (Ascii,37): "WGS 84 / UTM zone 35N + EGM96 height"
      GeogCitationGeoKey (Ascii,7): "WGS 84"
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      ProjectedCSTypeGeoKey (Short,1): PCS_WGS84_UTM_zone_35N
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
      VerticalCSTypeGeoKey (Short,1): Code-5773 (EGM96 height)
      VerticalCitationGeoKey (Ascii,13): "EGM96 height"
      End_Of_Keys.
   End_Of_Geotiff.

(pdal pipeline filters.overlay Debug) GDAL debug: GDAL: CPLIsUserFaultMappingSupported(): syscall(__NR_userfaultfd) failed: insufficient permission. add CAP_SYS_PTRACE capability, or set /proc/sys/vm/unprivileged_userfaultfd to 1
(pdal pipeline Debug) Executing pipeline in standard mode.
Killed

Process gets killed during filters.overlay so I am not sure if this would work as intended. Tools I would preferably use to tackle this are: QGIS, PDAL or Python.

0

Browse other questions tagged or ask your own question.