[pdal] writers.gdal off by half a pixel?

Andrew Bell andrew.bell.ia at gmail.com
Tue Mar 19 09:31:13 PDT 2019


Please open a ticket and attach all relevant information.

Thanks,

On Tue, Mar 19, 2019 at 12:27 PM Jim Klassen <klassen.js at gmail.com> wrote:

> I noticed when round tripping a DEM through readers.gdal to LAS (or CSV)
> and then back to writers.gdal that the output was shifted from the input by
> about half a pixel.
>
> I created a small 10x10 pixel test DEM and a simple pipelines to convert
> it to CSV via writers.text.  The X,Y coordinates in the CSV file match the
> center of the pixels of the source DEM as shown by QGIS, so I suspect that
> readers.gdal is correct.  I have another pipeline that is a readers.gdal
> into writers.gdal and QGIS shows the output DEM is shifted.
>
> I would be happy to share the 10x10 DEM and the pipelines if there is an
> appropriate place for them.
>
> I have attempted at a patch to writers.gdal that appears to fix this shift.
>
>
> https://github.com/klassenjs/PDAL/commit/c80963e938853ebd63aebe4e8a6ce7e1d5d53cbf
>
> I'm not sure I went about it the right way (vs redefining what m_offset
> means), but making the changes this way seemed like the least invasive way
> to make the code behave in a self consistent fashion.
>
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal



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


More information about the pdal mailing list