Martin,
Is there any way to specify the number of decimals in an output txt file using las2txt? I have LAS files in LatLon coordinates, and would like to convert this to a txt file, maintaining the decimal degree accuracy. By default, I seem to get 7 decimals from las2txt, but I would like to get a couple more. Is this hard coded or can this be changed? I send you a sample LAS file yesterday to you normal email address.
las2txt -i 540000-8240000_LL.las –parse xyz
results in:
129.4167330 -15.8289120 190.000
129.4167332 -15.8290024 188.240
129.4167334 -15.8290928 187.500
Thanks,
Edgar
Thank you for the info.
The reason that I expected that my data had more decimals, was that I loaded the file in Globalmapper and this is what the feature information for a point shows, 10 decimals for lat/Lon:
Point location: 129.4167329872 -15.8289120353 (Lat/Lon: 15° 49' 44.0833" S, 129° 25' 0.2388" E)
This compared to the las2txt output made me wonder where the rest of the decimals had gone.
129.4167330 -15.8289120 190.000
Maybe Globalmapper doesn't show the actual point information?
This data was generated using Globalmapper, but the header of the LAS file still shows Terrascan.
Edgar
Hello Edgar,
Cheers,
Martin @lastools
-----------------------------------------------------------------
--
Download LAStools at
http://lastools.org/
Visit the LAStools group at
http://groups.google.com/group/lastools/
Be social with LAStools at
http://www.facebook.com/LAStools
http://www.twitter.com/LAStools
> The reason that I expected that my data had more decimals, was
> that I loaded the file in Globalmapper and this is what the feature
> information for a point shows, 10 decimals for lat/Lon:
>
> Point location: 129.4167329872 -15.8289120353 (Lat/Lon: 15° 49' 44.0833" S, 129° 25' 0.2388" E)
[...]
> Maybe Globalmapper doesn't show the actual point information?
> This data was generated using Globalmapper, but the header of the LAS file still shows Terrascan.
I had noticed before that the LAS output of Globalmapper is not
optimal because is can result in miss-understandings in terms of the
precision of the file. I had even offered my services to rectify that
but that was not followed up at the time. So let me explain here the
reason why you are seeing 10 decimal digital of which the last three
are sense-less).
The LAS header of the Globalmapper generated LAS files contains these
scale and offset values (as can be seen in the lasinfo output that are
again at the end of the email)
scale factor x y z: 1e-007 1e-007 0.001
offset x y z: 129.41673208719459 -15.833613035278834 0
each double-precision LAS point's coordinate is computed based on the
following formula from the integers stored in the LAS file:
x = scale_factor_x * X + offset_x
y = scale_factor_y * Y + offset_y
z = scale_factor_z * Z + offset_z
so you will find that the particular formula for this file is
x = 0.0000001 * X + 129.41673208719459
y = 0.0000001 * Y + -15.833613035278834
z = 0.001 * Z + 0
because Globalmapper stores such "weird" offsets your points are
reported to all have many more precision digits than they actually
have because those "extra digits" are all the same digits. If you look
more careful you shall find that all of your 10 digit x coordinates
end in xxx.xxxxxxx872 and that all your 10 digit y coordinates end in
xxx.xxxxxxx353.
hence, globalmapper has essentially shifted your data set that really
only has 7 digits of precision stored in the LAS file by
0.00000008719459 in x direction and in 0.000000035278834 in y
direction.
cheers,
martin @lastools
You are right, all the decimals end with the same pattern, so 7 decimals seems to be all I'm actually getting.
Thanks for the explanation.
Edgar
-----Original Message-----
From: last...@googlegroups.com [mailto:last...@googlegroups.com] On Behalf Of Martin Isenburg
Hello Edgar,
[...]
cheers,
martin @lastools
--
Not only is 7 decimals what you have, it is almost certainly a (little)
bit more than required:
In the north-south direction degrees with 7 decimals correspond to 1.11
cm, while the east-west granularity is a bit less (depending upon how
far you are from equator).
Anyway, unless you manage to get some magical means to locate each LIDAR
hit with mm precision, a cm-level location is sufficient. :-)
(Sub-cm precision would be far more likely (and useful) for a land-based
static survey of a small area or structure. Getting useful information
in 10 decimals would correspond to 10um precision.:-) )
Terje
--
- <Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"