Repository navigation
r.in.pdal: fix reported data extent when CRS doesn't match - #6465
Conversation
|
The reprojected extent is slightly different on macOS, not sure what to make out of it: |
I wouldn't call 0.12 "slightly". It needs to be investigated. |
I tried couple different things. I tested proj 9.4.1 on linux which is newer than in the ubuntu CI (8.2.1) and older than the mac CI (9.6.2). The results on ubuntu are the same, so it might not be version problem. In the ncspm test dataset (running in CI on ubuntu) the reprojected bbox values of the points_6346.las are when I created a new dataset from EPSG:3358, the results change, they are somewhat closer to the original dataset, approx difference of 0.1 meter:
The new dataset has PROJ_WKT unlike the one in CI. Then I tried to compare directly the coordinates of the points once they are reprojected (inside But for some reason the reprojection pipeline transforming the bbox points gives different values. And none of this seems related to the difference with macOS. |
|
I remember reading something, probably gdal-dev mailing list, and I think you need to look about what proj-data is available in each, not only the version of the software. (And maybe which one is used) |
Right, that could be the difference between platforms. But I am struggling to get the reprojected bbox match exactly the reprojected points. |
|
You could try |
cwhite911
left a comment
There was a problem hiding this comment.
Looks good. Here are a few additional things Claude picked up.
-
Add fallback for missing SRS in get_extent.
When a file's SRS is invalid or empty, the raw header extent gets unioned with reprojected extents from other files, producing a meaningless combined bbox. A G_warning when SRS is missing on the -e path would help; note the import path fatals in this situation, so the two paths disagree quietly. -
Documentation not updated. This changes user-facing behavior (auto-reprojection is now the default, -w deprecated) but r.in.pdal.md/.html are untouched. The manual's description of projection handling and -w should be updated.
|
@petrasovaa do you want to open an issue to depracte the -w flag in v.in.pdal to keep the behavior consistent? |
This PR tries to fix problems with CRS