Using LAStools on Mac OS or Linux via "Wine"

1,039 views
Skip to first unread message

Martin Isenburg

unread,
Oct 9, 2014, 2:03:26 AM10/9/14
to last...@googlegroups.com
Hello,

Are you on Mac OS or Linux? Did you know that you can use "Wine" to run the Windows binaries of LAStools just by prepending a call to "wine" to each command line. The new Quantum GIS toolbox for LiDAR processing (to be released soon) will even do this for you. Until then follow the instructions provided by Yuriy Czoli ... (-:


Cheers,

Martin @rapidlasso

--
http://rapidlasso.com - fast tools to wine your LiDARs

Matteo Mura

unread,
Oct 9, 2014, 11:51:05 AM10/9/14
to last...@googlegroups.com
Wow!!! I tried it and it works well by single module, then I tried to run a .bat but it did not. Is there a way to run also a .bat routine by Mac?

Matteo

Oscar Martinez Rubi

unread,
Oct 9, 2014, 12:23:34 PM10/9/14
to last...@googlegroups.com
Hi,

In the Netherlands eScience Center and TU Delft we have been using "Wine" to run lassort and lasclip in Linux server as part of our benchmarks where we compare different solutions (next talk in SPAR conference). Even though it works I have to say that not as stable as one would like. I experienced some "hanging" processes when using lassort and in the case of lasclip the performance is quite variable depending on some factor that I have not been able to identify. I got the feeling that this "instability" was caused by "Wine" because other processes like lasindex and lasmerge (which do not require Wine) work always and with stable processing times.

Did somebody else also experienced these issues ?

So, we would benefit a lot from Linux-compiled lastools (Sorry Martin for being so pushy about it... ;-) )

Regards,

Oscar

Mike Windham

unread,
Oct 9, 2014, 1:14:10 PM10/9/14
to last...@googlegroups.com
Second the Linux motion, I'd be willing to look at sponsoring that effort ahead.   
--
New Spin LogoMike Windham | Inventor, US Marine & CEO | New Spin

755 Research Pwy. Ste. 540 Oklahoma City, OK 73104
p. 405-200-1880 Ext. 11  f. 800-360-6949
e. mi...@newspin.com  w. newspin.com



The information contained in this transmission may contain privileged and confidential information, including client information protected by federal and state privacy laws. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution, or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

Terje Mathisen

unread,
Oct 9, 2014, 2:50:10 PM10/9/14
to last...@googlegroups.com
Matteo Mura wrote:
> Wow!!! I tried it and it works well by single module, then I tried to
> run a .bat but it did not. Is there a way to run also a .bat routine
> by Mac?

Take each command line from the .bat file and copy them into a .sh file,
with wine prepended before each of the lines?

Terje
>
> Matteo
>
> Il giorno giovedì 9 ottobre 2014 01:03:26 UTC-5, Martin Isenburg ha
> scritto:
>
> Hello,
>
> Are you on Mac OS or Linux? Did you know that you can use "Wine"
> to run the Windows binaries of LAStools just by prepending a call
> to "wine" to each command line. The new Quantum GIS toolbox for
> LiDAR processing (to be released soon) will even do this for you.
> Until then follow the instructions provided by Yuriy Czoli ... (-:
>
> http://rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine/
> <http://rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine/>
>
> Cheers,
>
> Martin @rapidlasso
>
> --
> http://rapidlasso.com - fast tools to wine your LiDARs
>
- <Terje.M...@tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Newcomb, Doug

unread,
Oct 9, 2014, 2:50:44 PM10/9/14
to last...@googlegroups.com
my suggestion would be to run a python program that makes os.system calls

mylascommandstring=' wine las2las .............'
os.system(mylascommandstring)

repeat for every command.

Doug




--
Doug Newcomb
USFWS
Raleigh, NC
---------------------------------------------------------------------------------------------------------
The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.

Thomas Knudsen

unread,
Oct 10, 2014, 9:56:52 AM10/10/14
to last...@googlegroups.com

Perhaps something like "wine cmd.exe /c batfilename" could work? Obviously it means that you will need to have a copy of the Windows command processor on your Mac...

Peter van Oosterom

unread,
Oct 13, 2014, 8:10:48 PM10/13/14
to last...@googlegroups.com, Martin Isenburg
Dear Martin,

As explained by Oscar, we are doing benchmark testing with LAStools, do you agree with publishing the results (and comparing this to database oriented alternatives; e.g. Oracle, PostgreSQL, MonetDB)?

Kind regards, Peter.
-- 
Peter van Oosterom          P.J.M.va...@tudelft.nl
Section GIS technology      (room 01 oost 0330) Department OTB
Faculty of Architecture and the Built Environment, TU Delft
tel (+31) 15 2786950        Julianalaan 134, 2628 BL Delft, NL
fax (+31) 15 2784422        P.O. Box 5030, 2600 GA Delft, NL
http://geomatics.tudelft.nl MSc Geomatics
http://www.msc-gima.nl      MSc GIMA (Geo-Info Management&Appl)
http://www.gdmc.nl 

Albert Godfrind

unread,
Oct 14, 2014, 3:48:35 AM10/14/14
to last...@googlegroups.com, Martin Isenburg
I fully agree that Wine is definitely NOT the right approach for running compute-intensive tasks on Linux. While it works for running the occasional windows-only tool, it does not work for a full production environment. The best is still to build natively on the Linux platform.

I have built on linux the subset of lastools for which the sources are available, but I miss all the advanced tools. I agree that it is important to have a full binary distribution of the tools available for Linux. The fact that lastools are libraries and command-line tools makes this easier than if they had some sort of windows-only GUI.

Albert

--
ORACLE
Albert Godfrind | Geospatial technologies | Tel: +33 4 93 00 80 67 | Mobile: +33 6 09 97 27 23 | Skype: albert-godfrind
Oracle Server Technologies
400 Av. Roumanille,
 BP 309  | 06906 Sophia Antipolis cedex | France
Everything you ever wanted to know about Oracle Spatial




Oscar Martinez Rubi

unread,
Oct 14, 2014, 5:34:55 AM10/14/14
to last...@googlegroups.com
In addition to the error I reported few days ago regarding lassort (and wine) with files larger 60M now I also get errors with lasclip...

I was trying to use lasclip (with wine) to get all the points from a province in NL that should produce a LAS file with 13 billion points and I got this error

lasclip.exe -lof input25.list -poly query25.shp  -o output25.las -merged
wine: Unhandled page fault on read access to 0x0000001c at address 0x443889 (thread 0034), starting debugger...
Unhandled exception: page fault on read access to 0x0000001c in 32-bit code (0x00443889).

I do not know if I hit a limit in LAS files or Wine or lasclip? The first error is from wine though...

Regards,

O.

Nicolas Cadieux

unread,
Oct 14, 2014, 7:54:37 AM10/14/14
to last...@googlegroups.com

Would running it in a virtual machine be much slower? Graphics are a pain because video card are generally simulated but the access to the processor is not.  Its just reduced by the available memory and available cores.  Could be interesting to benchmark that.  Could be faster, or at least more stable then wine. Could be an interesting thing to compare that and a true Windows box...

Nicolas Cadieux M.Sc.
Les Entreprises Archéotec inc. 
8548, rue Saint-Denis Montréal H2P 2H2
Téléphone: 514.381.5112  Fax: 514.381.4995

Terje Mathisen

unread,
Oct 14, 2014, 8:20:52 AM10/14/14
to last...@googlegroups.com
Nicolas Cadieux wrote:
>
> Would running it in a virtual machine be much slower? Graphics are a
> pain because video card are generally simulated but the access to the
> processor is not. Its just reduced by the available memory and
> available cores. Could be interesting to benchmark that. Could be
> faster, or at least more stable then wine. Could be an interesting
> thing to compare that and a true Windows box...
>

This is a good idea!

As long as you have an SSD drive and allocate two CPU cores and enough
RAM to the virtual machine, it should run lastools pretty well.

The SSD is simply because VMware (and other virtualization handlers)
tend to multitask physical hard drives pretty badly, often hitting
severe performance problems.

The unlicensed version of lastools does not support more than two cores,
so there shouldn't be any need to allocated more than this.

If you do have a proper full license then you can definitely afford to
dedicate a high-end Windows box to run it on!

Terje
>
> Nicolas Cadieux M.Sc.
> Les Entreprises Archéotec inc.
> 8548, rue Saint-Denis Montréal H2P 2H2
> Téléphone: 514.381.5112 Fax: 514.381.4995
>
> Le 2014-10-14 05:29, Oscar Martinez Rubi <o.marti...@tudelft.nl> a
> écrit :
>
> In addition to the error I reported few days ago regarding lassort
> (and wine) with files larger 60M now I also get errors with lasclip...
>
> I was trying to use lasclip (with wine) to get all the points from
> a province in NL that should produce a LAS file with 13 billion
> points and I got this error
>
> lasclip.exe -lof input25.list -poly query25.shp -o output25.las
>>>> --Â
>>>> Download LAStools at
>>>> http://lastools.org <http://lastools.org/>
>>>> http://rapidlasso.com <http://rapidlasso.com/>
>>> --Â
>>> Download LAStools at
>>> http://lastools.org <http://lastools.org/>
>>> http://rapidlasso.com <http://rapidlasso.com/>
>>> Be social with LAStools at
>>> http://facebook.com/LAStools
>>> http://twitter.com/LAStools
>>> http://linkedin.com/groups/LAStools-4408378
>>> Manage your settings at
>>> http://groups.google.com/group/lastools/subscribe
>>>
>>> --
>>> Download LAStools at
>>> http://lastools.org <http://lastools.org/>
>>> http://rapidlasso.com <http://rapidlasso.com/>
>> ORACLE <http://www.oracle.com>
>> Albert Godfrind | Geospatial technologies | Tel: +33 4 93 00 80
>> 67Â | Mobile: +33 6 09 97 27 23Â | Skype:Â albert-godfrind
>> <skype:albert-godfrind>
>> Oracle Server Technologies
>> 400 Av. Roumanille, BP 309  | 06906 Sophia Antipolis cedexÂ
>> |Â France
>> Everything you ever wanted to know about Oracle Spatial
>> <http://www.apress.com/9781590598993>
>>
>> <http://www.locationintelligence.net/dc/>

Ravi Peters

unread,
Oct 15, 2014, 9:12:57 AM10/15/14
to last...@googlegroups.com, martin....@gmail.com
One more issue with this wine-based workflow, is that all the LAStools .exe's (not just lasview.exe) require a graphical environment, which your server might not have:

$ wine lassort

Application tried to create a window, but no driver could be loaded.

Make sure that your X server is running and that $DISPLAY is set correctly.

err:systray:initialize_systray Could not create tray window

err:wgl:process_attach X11DRV or GDI32 not loaded. Cannot create default context.

err:module:attach_process_dlls "opengl32.dll" failed to initialize, aborting


Ravi

Op dinsdag 14 oktober 2014 09:48:35 UTC+2 schreef Albert Godfrind:

Kirk Waters - NOAA Federal

unread,
Oct 15, 2014, 1:15:26 PM10/15/14
to last...@googlegroups.com, Martin Isenburg
You can generally get around the graphical environment issue by running xvfb (X virtual frame buffer), at least for those commands that don't actually need a graphical environment. I do wonder if there is some library set that Martin is pulling into the compile of everything that is making it look for GUI support when it doesn't need it.

Kirk
--
Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Albert Godfrind

unread,
Oct 16, 2014, 12:55:30 PM10/16/14
to last...@googlegroups.com, Martin Isenburg
It may also simply be because wine assumes that whatever application you run *always* needs a graphical interface. After all it is mostly used by people who want to run windows-centric games on their Mac or Linux desktop or laptop.

I had a quick look at the Wine documentation. It seems to have a number of configuration options to deal with graphics. I did not see any that lets you say: run without graphic support at all.

Albert

Veldman, Edgar

unread,
Oct 16, 2014, 9:12:29 PM10/16/14
to <lastools@googlegroups.com>, Martin Isenburg
It could be that it's the GUI that comes with every LAStool that is maybe an active but invisible form when running the tool from the command-line?

Kirk Waters - NOAA Federal

unread,
Oct 17, 2014, 7:30:28 AM10/17/14
to last...@googlegroups.com
Ravi,
I looked back at some notes from last year about wine with lastools. I think you may want to check what version of wine you've got. The two versions I had to work with were 1.6 and 1.0.1. With 1.6 and no DISPLAY set (doesn't know about a window manager), it complained, but the commands ran just fine. With wine 1.0.1, it complained and failed. If I ran xvfb so it thought it had a place to put a window, wine 1.0.1 would still complain a bit, but the commands would work. Someday I will convince the sys admin to upgrade...

Kirk

Ravi Peters

unread,
Oct 17, 2014, 10:04:20 AM10/17/14
to last...@googlegroups.com
Thanks! I'm on wine 1.4, which thus complains and fails. But your xvfb trick works, although I must say it is a nasty way to run things. 

Ravi

Op vrijdag 17 oktober 2014 13:30:28 UTC+2 schreef Kirk Waters:
Reply all
Reply to author
Forward
0 new messages