[Liblas-devel] libLAS in Java
hobu.inc at gmail.com
Tue Jul 14 12:58:05 EDT 2009
On Jul 13, 2009, at 10:46 PM, Patel, Ronak Avinash (US SSA) wrote:
> I was wondering if anyone could educate me what the exact bit
> is arranged for entering Coordinate System information into a LAS
> The LAS spec says that it is located inside of the Variable Length
> Record section. Could anyone point me to any information about this?
The spec says "Georeferencing for the LAS format will use the same
robust mechanism that was developed for the GeoTIFF standard. The
variable length header records section will contain the same data that
would be contained in the GeoTIFF key tags of a TIFF file."
Robustness is in the eye of the beholder, however :)
The place to look for libLAS' spatial referencing implementation is <http://liblas.org/browser/trunk/src/lasspatialreference.cpp
>. libLAS depends upon libgeotiff to actually interpret and consume
the GeoTIFF keys, however. I don't know if there is a libgeotiff
analog in the java world, but if there was, I would expect it lives in
GeoTools. Anyway, the GeoTIFF keys come in three flavors -- ASCII, an
array of doubles, and an array of integers. Your code needs to take
apart the VLR that stores each of these (they are stored in VLRs that
are separated by their type -- double, ascii, or int). After you have
read/wrote them, you then need to have some software that can
interpret them. libLAS uses libgeotiff or optionally GDAL to
interpret the GeoTIFF keys and turn them into well known text or proj4
identifiers in the case of libgeotiff only.
Hope this helps,
PS, I see Mateusz gave you a good explanation as well.
More information about the Liblas-devel