add forward option to retain las file scale and offset#1915
add forward option to retain las file scale and offset#1915smathermather merged 1 commit intoOpenDroneMap:masterfrom
Conversation
|
I have one question, how should I prepare the fix for OpenPointClass? It's not a fork and the fix would be a special patch just for ODM I suppose. |
|
https://github.com/originlake/OpenPointClass/tree/las-scale fix for openpointclass is here |
|
Thanks for this! As OpenPointClass (AFAIK) only operates on PLYs, there shouldn't be any floating point issues requiring setting las scale. But, double check my assumptions on that. I haven't looked under the hood of OpenPointClass in any serious way. Take a look at this pull request to appropriately set the scale instead of fixed: |
|
The classification starts with a smrf filter then followed with a openpointclass step. OPC does use laz file and overwrites the old laz file, leading to this issue. So both need to be fixed. Code for classification steps: Lines 280 to 300 in 5d4862e Code where the opc is used: Lines 7 to 30 in 5d4862e The scale and offset are computed dynamically in an early stage, my fix proposed here follows what is being set in the original laz file, which should be expected as the classification step should not alter the point cloud itself. Code where the offset and scale are set in the original laz file: ODM/stages/odm_georeferencing.py Lines 131 to 160 in 5d4862e |
|
Got it. Pull request against OpenPointClass and explain your concerns. If rejected and we need to maintain a fork with this functionality under an OpenDroneMap banner, happy to do so. |
|
Thanks, created the PR, will see how it goes. uav4geo/OpenPointClass#33 |
|
Nice work! Just update SuperBuild/cmake/External-OpenPointClass.cmake to point to the hash of the commit (dd6a560a1d43cb709f7b220b19a436e25a889e3e), since we don't know when the next release will be cut, and this is similar to how we're handling other upstream libraries now, and we should be good to merge. |
|
Awesome. Thanks! I'll update SuperBuild/cmake/External-OpenPointClass.cmake to point to the appropriate commit. |
When creating the georeferenced laz file, the scale is set to 0.001m(or value of spacing if it's smaller), offset is set to origin of the dataset. But the following classification steps do not respect the scale and offset, using the default value of pdal instead, which restricts the precision of point cloud data to 0.01m.
Fixed the smrf filter that used pdal directly. Still working on fixing OpenPointClass