Conversation
cwhite911
requested changes
Sep 5, 2026
cwhite911
left a comment
Contributor
There was a problem hiding this comment.
Overall, this looks good please make sure to update the html doc as well.
cwhite911
reviewed
Sep 20, 2026
Comment on lines
+349
to
+372
| bool need_to_reproject = false; | ||
| if (over_flag->answer) { | ||
| G_important_message(_("Overriding projection check and assuming" | ||
| " that the CRS of input matches" | ||
| " the project's CRS")); | ||
| } | ||
| else { | ||
| // getting projection is possible only after prepare | ||
| pdal::PointTable table; | ||
| try { | ||
| reader->prepare(table); | ||
| } | ||
| catch (const std::exception &err) { | ||
| G_fatal_error(_("PDAL error while reading <%s>: %s"), | ||
| in_opt->answer, err.what()); | ||
| } | ||
| pdal::SpatialReference spatial_reference = | ||
| reader->getSpatialReference(); | ||
| if (spatial_reference.empty() && !input_srs_opt->answer) | ||
| G_fatal_error(_("The input dataset has undefined projection")); | ||
| std::string dataset_wkt = spatial_reference.getWKT(); | ||
| need_to_reproject = !is_wkt_projection_same_as_loc(dataset_wkt.c_str()); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
What if you set need_to_reproject like this to catch cases where the LiDAR metadata may be incorrect
need_to_reproject = input_srs_opt->answer
? !is_wkt_projection_same_as_loc(input_srs_wkt)
: !is_wkt_projection_same_as_loc(dataset_wkt.c_str());
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes issue #7848
Deprecation of the -w flag in
v.in.pdal.