[Liblas-devel] LAS file Coordinate Systems

Patel, Ronak Avinash (US SSA) ronak.patel at baesystems.com
Tue Jul 21 15:15:53 EDT 2009


Hi,

I'm having several problems with LAS files and was wondering if the
people on the mailing list had any ideas/standards on how to solve these
problems.

I was able to generate a LAS file from Java (wasn't very hard to do at
all). However, I'm having problems with Coordinate System stuff.

Geotools is able to create a Geotiff header for me but the code to write
out the encoded header is tighly coupled to writing out a Geotiff image.
This doesn't work in this application.

Also, I noticed that if I enter in WGS-84 formatted x, y, values, I lose
enough precision (even with the scale factor) that I lose almost all of
my data.

Therefore, I am relegated to UTM values. However, how does the LAS spec
deal with collects which cross UTM boundaries?? How do you indicate that
a LAS file falls between 2, 3, and possibly 4 UTM zones??

Thanks for any help,

Ronak Patel


-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Tuesday, July 14, 2009 8:35 AM
To: Patel, Ronak Avinash (US SSA)
Cc: Howard Butler; Froumis, James A (US SSA);
liblas-devel at lists.osgeo.org
Subject: Re: [Liblas-devel] libLAS in Java

Patel, Ronak Avinash (US SSA) wrote:
> Hi,
> 
> I was wondering if anyone could educate me what the exact bit
structure
> is arranged for entering Coordinate System information into a LAS
file.
> 
> The LAS spec says that it is located inside of the Variable Length
> Record section. Could anyone point me to any information about this?

Ronak,

I'd be happy if SRS handling in LAS was as easy as juggling some bits,
unfortunately it is not.

In libLAS, we employ GeoTIFF engine to handle SRS information:
- first, check record class

http://liblas.org/browser/trunk/include/liblas/lasvariablerecord.hpp
http://liblas.org/browser/trunk/src/lasvariablerecord.cpp

- next, check this class - it's a kind of a specialized type of 
variable-length record - it wraps SRS logic

http://liblas.org/browser/trunk/include/liblas/lasspatialreference.hpp

- finally, check how SRS is read and write using the two above:

http://liblas.org/browser/trunk/src/detail/writer.cpp#L130
http://liblas.org/browser/trunk/src/detail/reader.cpp#L156

I'd be happy to provide you with simpler or even Java-oriented
explanation, but I am not aware of any. I hope this will help.

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




More information about the Liblas-devel mailing list