Archive for the 'liblas' Category

FOSS4G 2008, I can’t make it

Sunday, September 28th, 2008

…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!

Visual C++ Toolkit 2003 still in use

Monday, September 22nd, 2008

Charles Petzold's TattooIn 2004, Microsoft published Visual C++ Toolkit 2003 - full version of Visual C++ 2003 optimizing compiler (version 1310) available free of charge. It was the first free, good and almost complete implementation of C++ programming language by Microsoft. It is quite old but still used by many developers.

The Toolkit is fairly complete, but you can not avoid a few hacks if you want to use it :-) So, I’ve decided to collect them all in one place to help building projects like GEOS, libLAS or GDAL/OGR with the Visual C++ Toolkit 2003.

Installation

First, installation of the following packages is required:

  1. Microsoft .NET Framework SDK 1.1
  2. Microsoft Platform SDK for Windows Server 2003 R2
  3. Microsoft Visual C++ Toolkit 2003 (no longer available from Microsoft website, just be persistent cuiling for it)

Hacks

This is list of hacks like installation of missing components and fixing a project makefiles:

  1. The .NET Framework SDK 1.1 installation (listed above) is required in order to get C Run-Time libraries installed: msvcrt.lib and msvcrtd.lib. The .NET SDK installer will copy these files (and a few other components) to directories located in:

    C:\Program Files\Microsoft Visual Studio .NET 2003
    
  2. Surprisingly, import library for C++ Run-Time Library msvcp71.dll is not included in the Visual C++ Toolkit 2003 distribution. Missing files can be downloaded from CERN server: msvcprt.lib and msvcprt.def. Copy them into

    C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib
    
  3. The Toolkit does not include lib.exe utility - Microsoft Library Manager. Fortunately, lib.exe is just a simple wrapper on Microsoft Incremental Linker - link.exe. So, in your NMAKE makefiles replace lib.exe (or lib) command with:

    link.exe /lib
    

    Alternatively, you can build custom lib.exe wrapper using lib.c program. Recently, I’ve fixed NMAKE makefiles of GEOS (r2190) and libLAS (r876) projects using the former option.

Environment

Most of articles about Visual C++ Toolkit 2003 and Platform SDK installation procedure suggest to permanently update environment variables like INCLUDE, LIB and PATH. Personally, I don’t like this approach. Instead, I write a simple SET_MSVC71.BAT script which I execute in console window before I run NMAKE to build a software project using Visual C++ Toolkit 2003.

The script I use consists of three commands:

@echo off
CALL "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd"
CALL "C:\Program Files\Microsoft Visual C++ Toolkit 2003\vcvars32.bat"
CALL "C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\sdkvars.bat"

Copy this script to location that is available from the PATH.

Sample build - libLAS

Below, a few simple steps are presented of using Visual C++ Toolkit 2003 and environment configured as presented above to build libLAS project. The same procedure should work for projects like GEOS or GDAL/OGR.

  1. Run Command Prompt (cmd.exe)
  2. Configure environment by executing SET_MSVC71.BAT script:

    C:\> SET_MSVC71.BAT
    

    Check if basic commands are available: cl.exe, nmake.exe, link.exe.

  3. Go to libLAS source code directory:

    C:\> cd dev\liblas\trunk
    
  4. Run NMAKE command to build libLAS library and utilities:

    C:\dev\liblas\trunk> nmake /f makefile.vc
    

Good luck!

libLAS 1.0.0 Beta 2

Tuesday, August 19th, 2008

The libLAS project is getting closer to final release of 1.0.0 version. Today, Howard announced that 1.0.0 Beta 2 has been released. Source package is available at las-1.0.0b2.tar.bz2 (MD5).

libLAS is a BSD library for reading and writing LIDAR data encoded in ASPRS LAS File Format

The libLAS package include a bunch of command line utilities for processing LAS files.

The Beta 2 version, includes API for C, C++ and Python programming language. Recently, Martin Rodriguez from STEREOCARTO has contributed libLAS bindings for .NET and Mono platforms. It’s available in SVN trunk with bunch of tutorials provided. Kudos to Martin for his great work!

To everybody who works with ASPRS LAS data, we would appreciate your help in testing usability and stability of libLAS software. Don’t hesitate to post your comments to the liblas-devel mailing list.