[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.
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? 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:
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.
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
I followed the instruction you gave for installing Wine („brew install wine“) and it seemed to run through the steps all right, I suppose. However, I cannot find Wine on my Mac anywhere! Do you know in what folder or directory Brew is supposed to place Wine?
Thank you.
Why can’t there just be a short ‚how to movie‘ instead??! I really sorry, but I don’t get the steps, what do the grey boxes mean?
A. T: I think that the grey boxes contain exact letter-by-letter scripts we should copy and paste into the „command line“ of the „Terminal“ on our Macs. Then when you press the Enter key, the script is carried out as a command. But I’m not a computer code-writer, so i could be wrong.
In step 6, what does the „-i“ mean? wine lasview -i pathToYourFile/yourFile.laz
I assume that for „pathToYourFile/yourFile.laz“ I am supposed to substitute something. Is the „YourFile“ referring to my LiDAR data file? Is the second iteration „yourFile“ (after the forward slash) referring to some other file, or to a to-be-created file, or what?
Thank you.