libLAS moved to new repository

libLAS - ASPRS LiDAR data translation toolset Hobu proposed motion to migrate libLAS source code repository from Subversion to Mercurial. The motion has been approved and Hobu completed the mgration.

In order to check out libLAS source code from the new repository, issue the clone command:

hg clone http://hg.liblas.org/

The libLAS Trac has been re-configured to make the new repository browsable. Alternative Web-based interface is available at http://hg.liblas.org/.

Translating TerraSolid .bin to ASPRS LAS

New LiDAR data translator has been added to the collection of libLAS utilities (docs). Two days ago, Howard submitted first version of ts2las program which can be used to convert .bin files produced with TerraScan software from TerraSolid to .las file in ASPRS LAS 1.2 format:

ts2las -i input.bin -o output.las

The nice thing is that users will be are able to translate files in TerraSolid .bin format without loading MicroStation software.

The ts2las is expected to be included in libLAS 1.3 release. In the meantime, testers are strongly welcome and all feedback is greatly appreciated.

LAS Data Triangulation Tool

Two days ago Martin Isenburg announced new tool added to LASTools package (Martin’s tools where used as an inspiration and foundation to build libLAS package). It’s las2tin program:

A little tool available that triangulates LIDAR in LAS format and stores the result either as a (self-contained) OBJ file or as a list of indexed triangles in ASCII format

Detecting Visual C++ version in NMAKE makefile

Traditionally when building GDAL/OGR, GEOS or libLAS using NMAKE users specify version of Visual C++ compiler being used as value of MSVC_VER macro. This macros is not required but it’s recommended, so NMAKE can compose best possible set of compilation and linking flags for particular version of Visual C++. For instance, command specifying Visual C++ 8.0 (Visual Studio 2005) looks like this:

nmake -f makefile.vc MSVC_VER=1400

Recently, I hacked libLAS makefiles (and GEOS makefiles too), so Visual C++ version can be determined (semi-)automatically. NMAKE 1.62 or higher reports its version as value of _NMAKE_VER macro. The solution is to defined compiler version based on version of NMAKE tool:

Update 2009-04-03: Added _NMAKE_VER number 9.00.21022.08

!IF "$(_NMAKE_VER)" == ""
MSVC_VER = 4.0
!ERROR *** Prehistoric version of Visual C++
!ELSEIF "$(_NMAKE_VER)" == "162"
MSVC_VER = 5.0
!ERROR *** Prehistoric version of Visual C++
!ELSEIF "$(_NMAKE_VER)" == "6.00.8168.0"
MSVC_VER = 6.0
MSC_VER = 1200
!ERROR *** Prehistoric version of Visual C++
!ELSEIF "$(_NMAKE_VER)" == "7.00.9466"
MSVC_VER = 7.0
MSC_VER = 1300
!ELSEIF "$(_NMAKE_VER)" == "7.10.3077"
MSVC_VER = 7.1
MSC_VER = 1310
!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.42"
MSVC_VER = 8.0
MSC_VER = 1400
!ELSEIF "$(_NMAKE_VER)" == "8.00.50727.762"
MSVC_VER = 8.0
MSC_VER = 1400
!ELSEIF "$(_NMAKE_VER)" == "9.00.21022.08"
MSVC_VER = 9.0
MSC_VER = 1500
!ELSEIF "$(_NMAKE_VER)" == "9.00.30729.01"
MSVC_VER = 9.0
MSC_VER = 1500
!ELSE
MSVC_VER = 0.0
MSC_VER = 0
!ENDIF

Later macros MSVC_VER and MSC_VER can be used to report Visual C++ version:

!IF "$(MSVC_VER)" == "0.0" && "$(MSC_VER)" == "0"
!MESSAGE *** Cannot determined Visual C++ version
!ERROR *** Aborting make job
!ELSE
!MESSAGE *** Using Microsoft NMAKE version $(_NMAKE_VER)
!MESSAGE *** Using Microsoft Visual C++ version $(MSVC_VER)
!MESSAGE *** Using Microsoft C/C++ version $(MSC_VER)
!ENDIF

This is not a rocket science, but it seems to work well and it frees users from manual specification of Visual C++ version. I’m not sure how the NMAKE version numbers vary across Visual Studio versions and builds. It would be good collect these version numbers to make the solution reliable. So, I’d be thankful if readers using Visual Studio 2002, 2003, 2005 and 2008 or newer :-) could report their NMAKE versions directly to me or post them as comments below.

Using LibLAS with GRASS

Hamish has announced a short tutorial about how to libLAS and GRASS together to process LiDAR data encoded in ASPRS LAS format:

It is actually quite a simple task, but sometimes the incantations and programs to use are not so obvious if you haven’t used the software extensively.

Indeed, I’m sure many of us will find Hamish’s writing helpful. I still have a hope to find time to instrument GRASS with libLAS support implemented as a module. Another option is to find someone who would be interested in doing it – I’m good in delegating, aren’t I? If there would be anyone, please don’t hesitate to drop a message on liblas-devel.

libLAS 1.0.1

Today, Howard has announced new release of libLAS 1.0.1. The new version mostly brings update in Python bindings. Here is detailed report of all fixes in this milestone.

Selection of most important improvements include:

  • #82: Python bindings missing get/set intensity
  • #83: Support fractional seconds in the Python bindings
  • #84: Improve LASPoint::equal
  • #89: Python liblas.version did not work
  • #88: liblas-config script to provide library/include locations to software wishing to link to libLAS
  • #86: las2txt M option allowing the index number of the point to be included in the output

Traditionally, soruce code packages of libLAS are available – visit homepage of 1.0.1 release.

libLAS is a generic GNU autoconf/autotools project, however, and building libLAS is as simple as ./configure;make;make install.

Windows users can install libLAS from the OSGeo4W packages repository. This release contains the Python bindings, command-line utilities (including las2ogr) and development packages.

FOSS4G 2008, I can’t make it

…school, job, trips, move, army, school, move, new job…lots of things have been happening in my life with speed of light, so I’ve had to change most of my plans, especially those about traveling. And, I can’t make it to attend the FOSS4G 2008 conference.

Nevertheless, I’m still listed next to two positions of the conference program and that’s correct. I planned to help Frank Warmerdam during the Raster Processing and Preparation with GDAL workshop and to give one presentation – Introduction to ASPRS LAS data processing with libLAS.

Apparently, I won’t be able to assist Frank during the workshop – I’m sorry Frank! and I’m crossing my fingers for you. And, the libLAS presentation will be given by…Frank – crossing my fingers harder :-) Originally, I promised Frank I will provide him with presentation slides and I’ll be a virtual assistant. Actually, I failed even with that :-(

Fortunately, Hobu took over this task and prepared PDF document with a set of fantastic slides. Frank and Howard have really saved my ass and I’d like to send them veeery big thanks!

I regret I can’t come to Cape Town, to experience the fantastic atmosphere, to see hundreds geogeeks together, to have a great time with friends and to drink a little too much beer with Tim. See you guys in Sydney, 2009!