hobuinc / untwine

GNU General Public License v3.0
52 stars 22 forks source link

Untwine crashes while reading some las files with incorrectly specified global wkt encoding bit #165

Closed harveybia closed 5 months ago

harveybia commented 5 months ago

Some las files have incorrectly specified global wkt encoding bit, an example file can be found here (credit to https://github.com/qgis/QGIS/issues/51862#issuecomment-1876924497): https://drive.google.com/file/d/17VvGIpInvSQk1sSlA6kOBzQ5ppHUJQyW/view

untwine --files /path/to/e6280n58255_orbost_2019apr02_mpts-c2_v10cm_ahd-mga55.laz --output_dir /tmp/out.laz --single_file
Untwine Error: readers.las: Global encoding WKT flag not set for point format 6 - 10.

This can be worked around by specifying --nosrs to PDAL's reader.las pipeline (see: https://github.com/PDAL/PDAL/pull/3818). Currently in untwine there is no way to do that. This PR allows us to pass nosrs to the reader: https://github.com/hobuinc/untwine/pull/164

abellgithub commented 5 months ago

Is there some reason that you can't correct your file?

harveybia commented 5 months ago

Is there some reason that you can't correct your file?

One technically could, through: https://gist.github.com/wburt/f0c5a91cc5c30a1c8719adde7ba951d0

But for us providing a way to make the conversion pipeline robust to bad WKT without modifying user uploaded files is very helpful.

harveybia commented 5 months ago

Closing this as this is now merged: https://github.com/hobuinc/untwine/pull/164 Also according to hobu, PDAL will relax broken las global encoding WKT flag to a warning for version 2.7.2+