Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.in.pdal: Improve PDAL error handling #4750

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marisn
Copy link
Contributor

@marisn marisn commented Nov 24, 2024

Some non-conformant LAS files trigger an error in PDAL library that results in an unhandled exit from r.in.pdal module. This code catches all PDAL errors and reports them in a GRASS way.

One of error sources is lack of SRS information in the imported LAS file. This code propagates SRS check override from GRASS to PDAL library thus eliminating an error observed by non-conformant 1.4 LAS files.

Fixes: #4157

See also:
qgis/QGIS#51862 (comment)
PDAL/PDAL#3818

Some non-conformant LAS files trigger an error in PDAL library that
results in an unhandled exit from r.in.pdal module.
This code catches all PDAL errors and reports them in a GRASS way.

One of error sources is lack of SRS information in the imported LAS file.
This code propogates SRS check override from GRASS to PDAL library
thus eliminating an error observed by non-conformant 1.4 LAS files.

Fixes: OSGeo#4157
@marisn marisn added raster Related to raster data processing C++ Related code is in C++ backport to 8.4 PR needs to be backported to release branch 8.4 labels Nov 24, 2024
@marisn marisn added this to the 8.5.0 milestone Nov 24, 2024
@github-actions github-actions bot added Python Related code is in Python module tests Related to Test Suite labels Nov 24, 2024
@echoix
Copy link
Member

echoix commented Nov 24, 2024

Seems an appropriate solution to send nosrs to PDAL by reading your linked threads. Was the "nosrs" option available for all our supported versions? If not, we might need to change our version requirements.

@echoix
Copy link
Member

echoix commented Nov 24, 2024

@marisn I didn't know you were the person of knowledge on that topic. In the QGIS thread linked, it suggested having PDAL >=2.7.2. We had a problem in our docker images, where the PDAL version couldn't be upgraded, and we reverted it. #3960
Do you have an idea how we could get it unblocked? The later versions enforced a proj version that wasn't available for the ubuntu repositories.

One of the docker images is stuck on 2.7.1 (ubuntu wxGUI), and the debian one on 2.7.2.

@marisn
Copy link
Contributor Author

marisn commented Nov 24, 2024

Seems an appropriate solution to send nosrs to PDAL by reading your linked threads. Was the "nosrs" option available for all our supported versions? If not, we might need to change our version requirements.

Good catch! It has been added in PDAL 2.3.0 – we'll have to come up with some version check as PDAL doesn't like unknown options. Our minimum PDAL version is 1.7.1, although I have no idea if it is even possible to compile GRASS with all of its dependencies to work together with such ancient version.

@marisn marisn marked this pull request as draft November 24, 2024 13:10
@echoix
Copy link
Member

echoix commented Nov 24, 2024

Seems an appropriate solution to send nosrs to PDAL by reading your linked threads. Was the "nosrs" option available for all our supported versions? If not, we might need to change our version requirements.

Good catch! It has been added in PDAL 2.3.0 – we'll have to come up with some version check as PDAL doesn't like unknown options. Our minimum PDAL version is 1.7.1, although I have no idea if it is even possible to compile GRASS with all of its dependencies to work together with such ancient version.

We don't need to plan supporting such incompatible versions. Just like the Linux kernel assumes that, at one point, some older hardware isn't expected to be running the latest and greatest. It is normal for software to increase the requirements range at each release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to 8.4 PR needs to be backported to release branch 8.4 C++ Related code is in C++ module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r.in.pdal fails with LAS files without projection
2 participants