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

precisions loss when writing las file #247

Open
xiaohemaikoo opened this issue Mar 21, 2023 · 0 comments
Open

precisions loss when writing las file #247

xiaohemaikoo opened this issue Mar 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@xiaohemaikoo
Copy link
Collaborator

Scaling must be specified when writing las, or it loses some precisions with the default laspy parameters (

header = laspy.LasHeader(version="1.4", point_format=6)
).

Solutions could be like [this way ] (https://github.com/3dgeo-heidelberg/py4dgeo/blob/m3c2-ep/src/py4dgeo/m3c2ep.py#L198) :

        hdr.x_scale = 0.00025
        hdr.y_scale = 0.00025
        hdr.z_scale = 0.00025
        mean_extent = np.mean(outpoints, axis=0)
        hdr.x_offset = int(mean_extent[0])
        hdr.y_offset = int(mean_extent[1])
        hdr.z_offset = int(mean_extent[2])
@dokempf dokempf added the bug Something isn't working label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants