<div dir="ltr">I opened this ticket:<div><br></div><div><div><a href="https://github.com/PDAL/PDAL/issues/1584">https://github.com/PDAL/PDAL/issues/1584</a></div></div><div><br></div><div>It should be fixed shortly.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 6, 2017 at 5:36 PM, Piero Toffanin <span dir="ltr"><<a href="mailto:pt@masseranolabs.com" target="_blank">pt@masseranolabs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>First let me say that PDAL rocks. I love it.<br>
    </p>
    <p>I was wondering if there's a way to specify (cast) the data type
      of the X,Y,Z dimensions while reading a PLY file (so in effect
      override the type specified in the PLY header) in the PDAL
      pipeline.</p>
    <p>I have an input PLY file (untransformed.ply) that has the header:</p>
    <p>ply<br>
      format ascii 1.0<br>
      [ .... ]<br>
      property float x<br>
      property float y<br>
      property float z<br>
      [ .... ]</p>
    <p>And coordinate points with ~5 digits of precision.</p>
    <p>1.13759 12.1322 162.786 <br>
      [ .... ]<br>
    </p>
    <p>When I try to apply the following transform (add a east/north
      offset):<br>
    </p>
    <p>{<br>
        "pipeline": [<br>
          "untransformed.ply",<br>
          {<br>
            "matrix": "1 0 0 576705 0 1 0 5188170 0 0 1 0 0 0 0 1",<br>
            "type": "filters.transformation"<br>
          },<br>
          {<br>
            "a_srs": "EPSG:32615",<br>
            "filename": "transformed.las",<br>
            "offset_x": "576705",<br>
            "offset_y": "5188170",<br>
            "offset_z": "0"<br>
          }<br>
        ]<br>
      }<br>
    </p>
    <p>There's a loss of precision (I get a "grid-like" output, see
      <a class="m_-8732391774260824667moz-txt-link-freetext" href="https://cloud.githubusercontent.com/assets/1951843/25507885/9cd01d12-2b7c-11e7-9c54-0e219dae4f05.png" target="_blank">https://cloud.<wbr>githubusercontent.com/assets/<wbr>1951843/25507885/9cd01d12-<wbr>2b7c-11e7-9c54-0e219dae4f05.<wbr>png</a>).
      I think it's because the matrix transformation code here
      <a class="m_-8732391774260824667moz-txt-link-freetext" href="https://github.com/PDAL/PDAL/blob/dd97a033c5d487000e200304a7619e9978de6ae2/filters/TransformationFilter.cpp#L106" target="_blank">https://github.com/PDAL/PDAL/<wbr>blob/<wbr>dd97a033c5d487000e200304a7619e<wbr>9978de6ae2/filters/<wbr>TransformationFilter.cpp#L106</a>
      <u>correctly</u> treats points as floats.<br>
    </p>
    <p>Changing the PLY header to:</p>
    <p>ply<br>
      format ascii 1.0<br>
      [ .... ]<br>
      property double x<br>
      property double y<br>
      property double z<br>
      [ .... ]</p>
    Produces the expected output (no grid-like output).<br>
    <p>I was wondering if I could force the dimensions to be treated as
      a double directly from PDAL? Or perhaps is there interest in
      adding a flag (cast to dimension) in PDAL's PLY reader (I'd be
      happy to contribute to it)?<br>
    </p>
    More information about the background of this issue is also
    available here: <a class="m_-8732391774260824667moz-txt-link-freetext" href="https://github.com/OpenDroneMap/OpenDroneMap/issues/522" target="_blank">https://github.com/<wbr>OpenDroneMap/OpenDroneMap/<wbr>issues/522</a><br>
    <br>
    Thank you for any information you might have!<span class="HOEnZb"><font color="#888888"><br>
    <br>
    -Piero<br>
    <br>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/pdal</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div>