Skip to content

v.in.pdal: deprecate -w flag - #7855

Open
saket0187 wants to merge 4 commits into
OSGeo:mainfrom
saket0187:v_in_pdal_deprecate_w
Open

saket0187 wants to merge 4 commits into
OSGeo:mainfrom
saket0187:v_in_pdal_deprecate_w

Conversation

@saket0187

Copy link
Copy Markdown
Contributor

Closes issue #7848

Deprecation of the -w flag in v.in.pdal.

@github-actions github-actions Bot added vector Related to vector data processing C++ Related code is in C++ module docs markdown Related to markdown, markdown files labels Aug 27, 2026

@cwhite911 cwhite911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good please make sure to update the html doc as well.

Comment thread vector/v.in.pdal/main.cpp Outdated
Comment thread vector/v.in.pdal/main.cpp Outdated
@github-actions github-actions Bot added the HTML Related code is in HTML label Sep 6, 2026
@saket0187
saket0187 requested a review from cwhite911 September 6, 2026 07:58
Comment thread vector/v.in.pdal/main.cpp
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());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ Related code is in C++ docs HTML Related code is in HTML markdown Related to markdown, markdown files module vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants