Using LAStools on Mac OS X with “Wine”

[contributed by guest blogger Yuriy Czoli]

If you want to use LAStools on a Mac running OS X you will have to do some preparations. This is a brief introduction to get you up and running with LAStools on a Mac in the terminal. You may have heard that you can use “Wine” to run LAStools on OS X. Depending on your experience this might sound intuitive, or like utter jibberish. For those who feel more like the latter, let’s walk through this.

homebrew

If you don’t have Homebrew go ahead and install that now by following the instructions on the site. It should be one line found at the bottom of the page, entered into the terminal. It is a fantastic package manager which has saved me the trouble of dealing with unruly libraries, paths, dependencies, etc.

wine2

What is Wine? Wine allows for Windows programs to run on Mac OS X (and other non-Windows platforms like Linux). That is all we are interested in here. Read more about Wine here, if you’d like. Side note: You might see something called WineBottler in your search for information on Wine. You can use WineBottler to transform *.exe files to *.app files. I found it did not work with LAStools, but good to know about for other applications.

Follow these steps!

1. Let’s install Wine with Homebrew:

brew install wine

My build took 3.7 minutes. Time will vary. This next part is based off the code on this site.

2. Download LAStools:

http://lastools.org/download/lastools.zip

3. Place the download where you like (but avoid spaces and funny symbols in the directory names). Then change directories in the terminal to where the zipped folder is located. Unzip the LAStools distribution:

unzip lastools.zip

4. Enter the unzipped folder:

cd lastools

5. Now enter the ‘bin’ directory where the LAStools modules are located:

cd bin

6. Run some tool (here: lasview) by calling wine before the LAStools command:

wine lasview -i pathToYourFile/yourFile.laz

For lasview an OpenGL window should open up and you should see your LiDAR data being rendered (see the README file for all the different visualization options or follow this tutorial). Go ahead and start exploring your data. You can use any of the many LAStools modules by preceding the command with “wine”. Today I happened to be looking at a section of Helsinki:

helsinki

Then get going with LAStools and follow along the 6 new videos or the 4 step by step tutorials (1: quality checking, 2: LiDAR preparation, 3: derivative generation, 4: manual editing). After having installed Wine you will also be able to use LAStools via the QGIS toolboxes.

For the geospatially inclined, check out Homebrew for installing other libraries. If you are working with geospatial data, you can use brew to install GDAL, Postgres SQL, PostGIS, and many more.

One thought on “Using LAStools on Mac OS X with “Wine”

  1. winetricks will do the same but better full featured based on my experience at least for the new El Capitan on a Macbook PRO laptop and iMAC Desktop as well. On the Terminal (Command+Space Bar) copy this, paste, run the terminal app: ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” /dev/null after which (take your coffee break while on it) run: brew install winetricks
    I have had issues when I use Macports though

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s