[Liblas-devel] LAS file Coordinate Systems

Patel, Ronak Avinash (US SSA) ronak.patel at baesystems.com
Thu Jul 23 14:39:23 EDT 2009


Howard and Mateusz,

Thanks for the help...really appreciate it. Haven't really found many
people out there that know the low levels as much as you guys do.

I was looking at the LAS 1.2 spec and it says the Georeferencing
information requires the GeoKeyDirectoryTag Record.

I am able to write that tag out but I see that lasinfo always shows the
version to be 0.0.0 regardless of what I put in those fields.

According to the spec, the data should be arranged:

wKeyDirectoryVersion = 1 (2 bytes)
wKeyRevision = 1 (2 bytes)
wMinorRevision = 0 (2 bytes)
wNumberOfKeys  = the number of sets of 4 unsigned shorts to follow

I write out the above shorts and 0 out the rest of the data byte array
but lasinfo always shows 0.0.0 as the version.

Is the spec wrong? Or is something else going on here that lasinfo and
libLAS are doing??

Thanks,

Ronak Patel

-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Wednesday, July 22, 2009 4:48 PM
To: Patel, Ronak Avinash (US SSA)
Cc: Howard Butler; Liblas-devel at lists.osgeo.org
Subject: RE: [Liblas-devel] LAS file Coordinate Systems

Patel, Ronak Avinash \(US SSA\) wrote:
> Howard,
>
> I am trying to set everything in WGS 84 as you described but I am
seeing
> some weird things:
>
> I am setting my bounding box to the following envelope:
>
> {-2.68934056019039, 51.501158065529, 56}
> {-2.68570637283357, 51.5034265277949, 56}
>
> However, when I output the las I made using lasinfo.exe (from libLAS
> 1.2) it truncates the precision and only shows
>
> min x y z                  -2.689341 51.501158 0
> max x y z                  -2.685706 51.503427 0

lasinfo does the rounding:

http://liblas.org/browser/trunk/apps/lascommon.c#L281

This 6 decimal points is a reasonable choice of precision
used to present float-point value for data inspection purpose.

The libLAS, the library, does not (should not) do any rounding.

Best regards,
-- 
Mateusz Loskot
http://mateusz.loskot.net





More information about the Liblas-devel mailing list