[Liblas-devel] Precision of reprojection transforms
Edwards, David
dedwards at integrity-apps.com
Fri Apr 29 11:39:52 EDT 2011
> The problem is related to the formatting, but it is actually the data
> scaling, not the formatting. X, Y, and Z coordinates in LAS are stored
> as scaled integers. Your X, Y, Z values of your UTM data have two
> decimals of precision as defined by the scale and offset in the LAS
> file's header. Reprojecting the data into DD causes the data to be
> descaled into doubles, reprojected, and then scaled back by the
> scale/offset values of the point's header (in this case 0.01 for X/Y).
> This results in not enough precision, obviously.
>
> You need to tell the ReprojectionTransform about what it should use for
> the scale/offset of the output data. You can do this by creating a
> copy of your header, setting the scale/offset to what you need, and
> then giving a shared_ptr of that to the ReprojectionTransform
> constructor. See line 1332 of apps/laskernel.cpp for an example.
>
> Hope this helps,
>
> Howard
Thanks for your help, this solution solved my problem. I wasn't aware that the reprojection transform was using the scale factors from the input file header.
Dave
More information about the Liblas-devel
mailing list