<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Andrew and thaks for your answer.</p>
    <p>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?</p>
    <p><br>
    </p>
    <p>Raúl.</p>
    <div class="moz-cite-prefix">El 20/06/2024 a las 13:45, Andrew Bell
      escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACJ51z0+hZmJ-SNL0MLtPTQGByY7U4KY8zSfm9xiZQrmsKfVHQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Raul,
        <div><br>
        </div>
        <div>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.</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Jun 20, 2024 at
          4:24 AM Raúl Casado Barbero via pdal <<a
            href="mailto:pdal@lists.osgeo.org" moz-do-not-send="true"
            class="moz-txt-link-freetext">pdal@lists.osgeo.org</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>
            <p>Hi,</p>
            <p>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.</p>
            <p>I use 2 different pipelines (see below) to do that
              modified from <a
href="https://github.com/manaakiwhenua/pycrown/issues/18"
                target="_blank" moz-do-not-send="true">this post</a>.
              But I have 2 issues:</p>
            <ul>
              <li>When I calculate the difference between DSM and DTM I
                get negative values</li>
              <li>The pixels of the DTM are horizontally displaced with
                respect to the DSM by half a pixel.</li>
            </ul>
            <p>Does anyone know why I am getting these negative values
              using this pipelines? Is anything wrong in the pipelines
              I`m using?<br>
              <br>
              <br>
              Raúl.<br>
              <br>
              Pipeline for DSM:<br>
              <br>
              [<br>
                  "nubeRecortadaPdal_1.laz",<br>
                  {<br>
                      "type": "filters.range",<br>
                      "limits":"returnnumber[1:1]"<br>
                  },<br>
                  {<br>
                      "type": "writers.gdal",<br>
                      "filename": "nubeRecortadaPdal_1_mds.tif",<br>
                      "output_type": "idw",<br>
                      "gdaldriver": "GTiff",<br>
                      "resolution": 0.05, <br>
                      "nodata": -9999,<br>
                      "radius": 0.07,<br>
                      "window_size": 50,<br>
                      "data_type": "float32"<br>
                  }<br>
              ]<br>
              <br>
              Pipeline for DTM:<br>
              <br>
              [<br>
                  "nubeRecortadaPdal_1.laz",<br>
                  {<br>
                      "type":"filters.overlay",<br>
                      "dimension":"Classification",<br>
                      "datasource":"D:/Datos/clasificadasVector.gpkg",<br>
                      "layer":"ndviRandomForest",<br>
                      "column":"Id"<br>
                  },<br>
                  {<br>
                      "type":"filters.range",<br>
                      "limits":"Classification[2:2]"<br>
                  },<br>
                  {<br>
                      "type": "writers.gdal",<br>
                      "filename": "nubeRecortadaPdal_1_mdt_ndviRf.tif",<br>
                      "output_type": "idw",<br>
                      "gdaldriver": "GTiff",<br>
                      "resolution": 0.05, <br>
                      "nodata": -9999,<br>
                      "radius": 0.07,<br>
                      "window_size": 100,<br>
                      "data_type": "float32"<br>
                  }<br>
              ]</p>
            <br>
          </div>
          _______________________________________________<br>
          pdal mailing list<br>
          <a href="mailto:pdal@lists.osgeo.org" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">pdal@lists.osgeo.org</a><br>
          <a href="https://lists.osgeo.org/mailman/listinfo/pdal"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/pdal</a><br>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">Andrew Bell<br>
        <a href="mailto:andrew.bell.ia@gmail.com" target="_blank"
          moz-do-not-send="true" class="moz-txt-link-freetext">andrew.bell.ia@gmail.com</a></div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
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</pre>
  </body>
</html>