[Liblas-devel] libLAS SRS Reprojection Support and Compiling From Source

Howard Butler hobu.inc at gmail.com
Mon Mar 8 13:35:48 EST 2010


On Mar 8, 2010, at 10:23 AM, Dan Bellinski wrote:

> Hey Howard,
> 
> I was unable to find any references to lasfile.obj in the current
> makefile.vc (thus couldn't get past the build error).

most likely src/lasfile.obj  I will try to clean up the windows building stuff.  Another alternative you might try is the cmake build.  I think Mateusz has it working on windows.  This is where I would ultimately plan to go with our windows build stuff.

> I just
> back-dated the source I was building from to the 1.2 release (1496)
> and I was able to compile libLAS against GeoTiff 1.2.5 (from the
> mapserver buildkit) and gdal 1.7.1 trunk.
> 
> I now have two questions:
> 1. Should the libLAS code version I used to compile be new enough to
> be able to do the LAS re-projections? If not, do you have any other
> hints as to fixing the lasfile.obj build error (how I can remove it
> from trying to build)?

You need something relatively recent.  I think I added support for it around December and then made it actually work in the January timeframe.


> 
> 2. Assuming everything is compiled right, I now have 2 ways to change
> the projections on my LAS files. I am unsure how I will do this as I
> couldn't find any documentation on it (other than the blip on the main
> liblas page). Could you offer insight as to how I should go about
> doing this with either method? It would be helpful to know what .exes
> I will need to use and if you have accomplished this before maybe any
> example notes you have?

With a recent checkout:

las2las -v in.las output.las -xyz_offset 0 0 0 -t_srs EPSG:4326 --xyz_scale 0.0000001 0.0000001 0.0000001 -s_srs EPSG:26915

This would override the existing SRS description of the file to EPSG:26915 and transform it to EPSG:4326.  As part of the process it will also set the scale to seven decimals.  Perhaps this file had only two decimals of scale, which would clearly not be enough to store meaningful decimal degree data.

I would note that this operation currently does not take into account vertical datum transformation operations.  That's in the works though, and will hopefully be enabled in a future version of GDAL/proj.4/libLAS/etc

Howard


More information about the Liblas-devel mailing list