[pdal] Calculation of the difference between DSM and DTM

Andrew Bell andrew.bell.ia at gmail.com
Tue Jun 25 06:58:08 PDT 2024


Hi Raul,

Are you sure you're not seeing places where you have NODATA in one raster
or the other?

On Tue, Jun 25, 2024 at 2:09 AM Raúl Casado Barbero <raul.casado at eez.csic.es>
wrote:

> Hi,
>
> thank you both. Imodified the pipeline adding origin_x, origin_y, width
> and height and now I get consistency inthe new rasters.
>
> The problem is that I still get negative values when I substract the MDT
> to MDS. Could it be due to interpolation in the calculation of MDT? If I
> get this raster by filtering the vegetation, could it be that values
> lower than MDS appear in areas where there is vegetation?
>
>
> Greetings.
>
> El 20/06/2024 a las 16:51, Connor Manning escribió:
> > For general information on how pipelines work:
> > https://pdal.io/en/2.7-maintenance/pipeline.html
> > And here is the information on the GDAL writer specifically, take a
> > look at origin_x and origin_y:
> > https://pdal.io/en/2.7-maintenance/stages/writers.gdal.html#writers-gdal
> >
> > For your pipelines, the GDAL writer is independently choosing its own
> > grid each time since you have not specified an origin, so the pixels
> > don't line up between the two outputs.  You want to explicitly set the
> > same origin, via the above options, for both of your writers.gdal
> > outputs to make sure they line up.
> >
> > - Connor
> >
> > On Thu, Jun 20, 2024 at 8:36 AM Raúl Casado Barbero via pdal
> > <pdal at lists.osgeo.org> wrote:
> >> Hi Andrew and thaks for your answer.
> >>
> >> I'm pretty new with pdal just now and I'm tryingn to understand the
> logic of pipelines... What do you mean with set the origin on writers.gdal?
> >>
> >>
> >> Raúl.
> >>
> >> El 20/06/2024 a las 13:45, Andrew Bell escribió:
> >>
> >> Hi Raul,
> >>
> >> You should set the origin on writers.gdal in order to get the
> consistency you desire. Without this, the origin is set according to the
> first point processed, which may differ between pipelines.
> >>
> >> On Thu, Jun 20, 2024 at 4:24 AM Raúl Casado Barbero via pdal <
> pdal at lists.osgeo.org> wrote:
> >>> Hi,
> >>>
> >>> my aim is to calculate the fitovolume of a shrub vegetation area. To
> do that I calculate the DSM, classify a point cloud with ground (2) and low
> vegetation (3) and then create a DTM.
> >>>
> >>> I use 2 different pipelines (see below) to do that modified from this
> post. But I have 2 issues:
> >>>
> >>> When I calculate the difference between DSM and DTM I get negative
> values
> >>> The pixels of the DTM are horizontally displaced with respect to the
> DSM by half a pixel.
> >>>
> >>> Does anyone know why I am getting these negative values using this
> pipelines? Is anything wrong in the pipelines I`m using?
> >>>
> >>>
> >>> Raúl.
> >>>
> >>> Pipeline for DSM:
> >>>
> >>> [
> >>>      "nubeRecortadaPdal_1.laz",
> >>>      {
> >>>          "type": "filters.range",
> >>>          "limits":"returnnumber[1:1]"
> >>>      },
> >>>      {
> >>>          "type": "writers.gdal",
> >>>          "filename": "nubeRecortadaPdal_1_mds.tif",
> >>>          "output_type": "idw",
> >>>          "gdaldriver": "GTiff",
> >>>          "resolution": 0.05,
> >>>          "nodata": -9999,
> >>>          "radius": 0.07,
> >>>          "window_size": 50,
> >>>          "data_type": "float32"
> >>>      }
> >>> ]
> >>>
> >>> Pipeline for DTM:
> >>>
> >>> [
> >>>      "nubeRecortadaPdal_1.laz",
> >>>      {
> >>>          "type":"filters.overlay",
> >>>          "dimension":"Classification",
> >>>          "datasource":"D:/Datos/clasificadasVector.gpkg",
> >>>          "layer":"ndviRandomForest",
> >>>          "column":"Id"
> >>>      },
> >>>      {
> >>>          "type":"filters.range",
> >>>          "limits":"Classification[2:2]"
> >>>      },
> >>>      {
> >>>          "type": "writers.gdal",
> >>>          "filename": "nubeRecortadaPdal_1_mdt_ndviRf.tif",
> >>>          "output_type": "idw",
> >>>          "gdaldriver": "GTiff",
> >>>          "resolution": 0.05,
> >>>          "nodata": -9999,
> >>>          "radius": 0.07,
> >>>          "window_size": 100,
> >>>          "data_type": "float32"
> >>>      }
> >>> ]
> >>>
> >>>
> >>> _______________________________________________
> >>> pdal mailing list
> >>> pdal at lists.osgeo.org
> >>> https://lists.osgeo.org/mailman/listinfo/pdal
> >>
> >>
> >> --
> >> Andrew Bell
> >> andrew.bell.ia at gmail.com
> >>
> >> --
> >> Raúl Casado Barbero
> >> Servicio de Evaluación, Restauración y Protección de Agrosistemas
> Mediterráneos
> >> Estacion Experimental del Zaidin, CSIC
> >> Calle Profesor Albareda 1, 18008 Granada, Spain
> >> Phone: +34 958181600 VolP CSIC 439186
> >>
> >> _______________________________________________
> >> pdal mailing list
> >> pdal at lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/pdal
>
> --
> Raúl Casado Barbero
> Servicio de Evaluación, Restauración y Protección de Agrosistemas
> Mediterráneos
> Estacion Experimental del Zaidin, CSIC
> Calle Profesor Albareda 1, 18008 Granada, Spain
> Phone: +34 958181600 VolP CSIC 439186
>
>

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20240625/68f2a2df/attachment.htm>


More information about the pdal mailing list