Skip to content

Instantly share code, notes, and snippets.

@YKCzoli
Created September 21, 2014 22:03
Show Gist options
  • Save YKCzoli/9bcc297152bbb97846e7 to your computer and use it in GitHub Desktop.
Save YKCzoli/9bcc297152bbb97846e7 to your computer and use it in GitHub Desktop.
LAStools Via Wine

Running LAStools on your Mac

If you want to use LAStools on OS X you will have to do some prep. 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 should use wine to run LAStools on OS X. Depending on your experience this might sound intuitive, or like utter jibberish. For those who empathize with the latter, let's walk through this.

Homebrew

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.

What is wine?!

wine2

Wine allows for windows programs to run on mac OS X. 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, and change directories in the terminal to where the zipped folder is located. Unzip LAStools.

unzip lastools.zip

4. Enter the unzipped folder.

cd lastools

5. Now enter the 'bin' directory. This is where the LAStools algorithms are located.

cd bin

6. Try running a tool by calling wine before the LAStools command.

wine lasview pathToYourFile/yourFile.laz

You should see the GUI open up and see your LiDAR data. Go ahead and start exploring your data. You can use any LAStool 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 new tutorials.

For the spatially inclined, check out using homebrew for installing other libraries. If you are working with spatial data, you can use brew to install GDAL, Postgres, Postgis, and many more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment