las tools on Mac

1,349 views
Skip to first unread message

Jim Teneycke

unread,
Mar 12, 2021, 5:25:49 PM3/12/21
to LAStools - efficient tools for LiDAR processing
I have installed and pointed to the folder with the Lastools, but every command I try I get the could not find command message.
Then looking in that folder, it is mostly EXE files?
Will this work on a Mac?

cheers,

David Friedrich

unread,
Mar 15, 2021, 7:00:52 AM3/15/21
to last...@googlegroups.com
If you search for "lastools mac" the first result wil be an article about how to use wine with lastools.

David

------ Originalnachricht ------
Von: "Jim Teneycke" <jimte...@gmail.com>
An: "LAStools - efficient tools for LiDAR processing" <last...@googlegroups.com>
Gesendet: 12.03.2021 19:18:15
Betreff: [LAStools] las tools on Mac

--
Download LAStools at
http://lastools.org
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
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/c18e5e66-ab38-4e01-85b9-b04e113e364an%40googlegroups.com.

Adam Dershowitz

unread,
Mar 15, 2021, 5:45:41 PM3/15/21
to last...@googlegroups.com

The difficulty is that Wine is not supported on the current versions of MacOS, nor is it likely to be support on the newer M1 based Macs.

 

 

-- Adam

 

 

From: <last...@googlegroups.com> on behalf of David Friedrich <david.f...@digimapas.cl>
Reply-To: "last...@googlegroups.com" <last...@googlegroups.com>
Date: Monday, March 15, 2021 at 7:00 AM
To: "last...@googlegroups.com" <last...@googlegroups.com>
Subject: [EXTERNAL] Re: [LAStools] las tools on Mac

 

CAUTION: This Email is from an EXTERNAL source. Ensure you trust this email address before replying or clicking on any links or attachments.

 

Felix Audirac

unread,
Mar 16, 2021, 7:33:57 AM3/16/21
to last...@googlegroups.com
Have you given a though at trying virtual machines/desktop on azure or aws? It has the downside that you need an internet connection but it’s a nice way to ‘run’ exe from a Mac. Setup takes about 10 minutes. 


--
Felix Audirac | CEO | CartoData
+52 (33) 36271552 | @faudirac |www.cartodata.com |

Adam Dershowitz

unread,
Mar 16, 2021, 1:07:10 PM3/16/21
to last...@googlegroups.com

The question was about how to run lastools on a MacOS.  Your answer is “here’s a way to buy and run Windows”. 

Albert Godfrind

unread,
Mar 16, 2021, 3:25:02 PM3/16/21
to last...@googlegroups.com
Building the open source subset of lastools is pretty easy. I just downloaded and unzipped the LAStools.zip file on my mac (runs macOS 10.15.7 Catalina). Then:

$ cd LAStools/
$ ls
ArcGIS_toolbox        CMakeLists.txt        HALL_OF_BLAME.txt     IMAGINE_toolbox       LASzip                Makefile              README.txt            data                  lastools.dsw
CHANGES.txt           COPYING.txt           HALL_OF_SHAME.txt     LASlib                LICENSE.txt           QGIS_toolbox          bin                   example_batch_scripts src

$ make
cd LASlib && make
cd src && make
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laszip.cpp -o ../../LASzip/src/laszip.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasreadpoint.cpp -o ../../LASzip/src/lasreadpoint.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasreaditemcompressed_v1.cpp -o ../../LASzip/src/lasreaditemcompressed_v1.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasreaditemcompressed_v2.cpp -o ../../LASzip/src/lasreaditemcompressed_v2.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasreaditemcompressed_v3.cpp -o ../../LASzip/src/lasreaditemcompressed_v3.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasreaditemcompressed_v4.cpp -o ../../LASzip/src/lasreaditemcompressed_v4.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laswritepoint.cpp -o ../../LASzip/src/laswritepoint.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laswriteitemcompressed_v1.cpp -o ../../LASzip/src/laswriteitemcompressed_v1.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laswriteitemcompressed_v2.cpp -o ../../LASzip/src/laswriteitemcompressed_v2.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laswriteitemcompressed_v3.cpp -o ../../LASzip/src/laswriteitemcompressed_v3.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/laswriteitemcompressed_v4.cpp -o ../../LASzip/src/laswriteitemcompressed_v4.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/integercompressor.cpp -o ../../LASzip/src/integercompressor.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/arithmeticdecoder.cpp -o ../../LASzip/src/arithmeticdecoder.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/arithmeticencoder.cpp -o ../../LASzip/src/arithmeticencoder.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/arithmeticmodel.cpp -o ../../LASzip/src/arithmeticmodel.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasindex.cpp -o ../../LASzip/src/lasindex.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasquadtree.cpp -o ../../LASzip/src/lasquadtree.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/lasinterval.cpp -o ../../LASzip/src/lasinterval.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. ../../LASzip/src/mydefs.cpp -o ../../LASzip/src/mydefs.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader.cpp -o lasreader.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasignore.cpp -o lasignore.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter.cpp -o laswriter.o
In file included from laswriter.cpp:31:
../inc/laswriter.hpp:134:8: warning: private field 'buffered' is not used [-Wunused-private-field]
  BOOL buffered;
       ^
1 warning generated.
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_las.cpp -o lasreader_las.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_bin.cpp -o lasreader_bin.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_shp.cpp -o lasreader_shp.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_asc.cpp -o lasreader_asc.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_bil.cpp -o lasreader_bil.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_dtm.cpp -o lasreader_dtm.o
lasreader_dtm.cpp:87:29: warning: unused variable 'PCS_NAD83_Kentucky_South' [-Wunused-const-variable]
static const unsigned short PCS_NAD83_Kentucky_South = 26980;
                            ^
1 warning generated.
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_ply.cpp -o lasreader_ply.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_qfit.cpp -o lasreader_qfit.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreader_txt.cpp -o lasreader_txt.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreadermerged.cpp -o lasreadermerged.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreaderbuffered.cpp -o lasreaderbuffered.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreaderstored.cpp -o lasreaderstored.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasreaderpipeon.cpp -o lasreaderpipeon.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter_las.cpp -o laswriter_las.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter_bin.cpp -o laswriter_bin.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter_qfit.cpp -o laswriter_qfit.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter_wrl.cpp -o laswriter_wrl.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswriter_txt.cpp -o laswriter_txt.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswritercompatible.cpp -o laswritercompatible.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswaveform13reader.cpp -o laswaveform13reader.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laswaveform13writer.cpp -o laswaveform13writer.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasutility.cpp -o lasutility.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lasfilter.cpp -o lasfilter.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. lastransform.cpp -o lastransform.o
lastransform.cpp:790:149: warning: multi-character character constant [-Wmultichar]
  inline I32 get_command(CHAR* string) const { return sprintf(string, "-%s%c %u ", name(), (rgbi == 0 ? 'R' : (rgbi == 1 ? 'G' : (rgbi == 2 ? 'B' : 'NIR'))), index); };
                                                                                                                                                    ^
lastransform.cpp:1068:149: warning: multi-character character constant [-Wmultichar]
  inline I32 get_command(CHAR* string) const { return sprintf(string, "-%s%c %u ", name(), (rgbi == 0 ? 'R' : (rgbi == 1 ? 'G' : (rgbi == 2 ? 'B' : 'NIR'))), index); };
                                                                                                                                                    ^
2 warnings generated.
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. laskdtree.cpp -o laskdtree.o
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG -DUNORDERED -DHAVE_UNORDERED_MAP -std=c++11 -I/usr/include/ -I../../LASzip/src -I../inc -I. fopen_compressed.cpp -o fopen_compressed.o
ar rc liblas.a ../../LASzip/src/laszip.o ../../LASzip/src/lasreadpoint.o ../../LASzip/src/lasreaditemcompressed_v1.o ../../LASzip/src/lasreaditemcompressed_v2.o ../../LASzip/src/lasreaditemcompressed_v3.o ../../LASzip/src/lasreaditemcompressed_v4.o ../../LASzip/src/laswritepoint.o  ../../LASzip/src/laswriteitemcompressed_v1.o ../../LASzip/src/laswriteitemcompressed_v2.o ../../LASzip/src/laswriteitemcompressed_v3.o ../../LASzip/src/laswriteitemcompressed_v4.o ../../LASzip/src/integercompressor.o ../../LASzip/src/arithmeticdecoder.o ../../LASzip/src/arithmeticencoder.o ../../LASzip/src/arithmeticmodel.o ../../LASzip/src/lasindex.o ../../LASzip/src/lasquadtree.o ../../LASzip/src/lasinterval.o ../../LASzip/src/mydefs.o  lasreader.o lasignore.o laswriter.o lasreader_las.o lasreader_bin.o lasreader_shp.o lasreader_asc.o lasreader_bil.o lasreader_dtm.o lasreader_ply.o lasreader_qfit.o lasreader_txt.o lasreadermerged.o lasreaderbuffered.o lasreaderstored.o lasreaderpipeon.o laswriter_las.o laswriter_bin.o laswriter_qfit.o laswriter_wrl.o laswriter_txt.o laswritercompatible.o laswaveform13reader.o laswaveform13writer.o lasutility.o lasfilter.o lastransform.o laskdtree.o fopen_compressed.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: liblas.a(mydefs.o) has no symbols
cp -p liblas.a ../lib
cd example && make
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample.cpp -o lasexample.o
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample.o -llas -o lasexample  -L../lib -I/usr/include -I../../LASzip/src -I../inc
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample_write_only.cpp -o lasexample_write_only.o
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample_write_only.o -llas -o lasexample_write_only  -L../lib -I/usr/include -I../../LASzip/src -I../inc
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample_add_rgb.cpp -o lasexample_add_rgb.o
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample_add_rgb.o -llas -o lasexample_add_rgb  -L../lib -I/usr/include -I../../LASzip/src -I../inc
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample_simple_classification.cpp -o lasexample_simple_classification.o
lasexample_simple_classification.cpp:98:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample_simple_classification.o -llas -o lasexample_simple_classification  -L../lib -I/usr/include -I../../LASzip/src -I../inc
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample_write_only_full_waveform.cpp -o lasexample_write_only_full_waveform.o
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample_write_only_full_waveform.o -llas -o lasexample_write_only_full_waveform  -L../lib -I/usr/include -I../../LASzip/src -I../inc
g++  -c -O3 -Wall -Wno-strict-aliasing -Wno-unused-result -I/usr/include -I../../LASzip/src -I../inc lasexample_write_only_with_extra_bytes.cpp -o lasexample_write_only_with_extra_bytes.o
g++  -O3 -Wall -Wno-strict-aliasing -Wno-unused-result lasexample_write_only_with_extra_bytes.o -llas -o lasexample_write_only_with_extra_bytes  -L../lib -I/usr/include -I../../LASzip/src -I../inc
cd LASzip && make
cd example && make clean
rm -rf *.o
cd src && make clean
rm -rf *.o
cd src && make
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  laszip.o geoprojectionconverter.o -llas -o laszip  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp laszip ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  lasinfo.cpp -o lasinfo.o
lasinfo.cpp:314:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
lasinfo.cpp:142:20: warning: unused function 'VecUpdateMinMax3dv' [-Wunused-function]
static inline void VecUpdateMinMax3dv(double min[3], double max[3], const double v[3])
                   ^
lasinfo.cpp:149:20: warning: unused function 'VecCopy3dv' [-Wunused-function]
static inline void VecCopy3dv(double v[3], const double a[3])
                   ^
3 warnings generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  lasinfo.o geoprojectionconverter.o -llas -o lasinfo  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp lasinfo ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  lasprecision.cpp -o lasprecision.o
lasprecision.cpp:230:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  lasprecision.o geoprojectionconverter.o -llas -o lasprecision  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp lasprecision ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  las2txt.cpp -o las2txt.o
las2txt.cpp:623:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  las2txt.o -llas -o las2txt  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp las2txt ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  txt2las.cpp -o txt2las.o
txt2las.cpp:198:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  txt2las.o geoprojectionconverter.o -llas -o txt2las  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp txt2las ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  las2las.cpp -o las2las.o
las2las.cpp:369:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  las2las.o geoprojectionconverter.o -llas -o las2las  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp las2las ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  lasdiff.cpp -o lasdiff.o
lasdiff.cpp:925:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  lasdiff.o -llas -o lasdiff  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp lasdiff ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  lasmerge.cpp -o lasmerge.o
lasmerge.cpp:131:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  lasmerge.o geoprojectionconverter.o -llas -o lasmerge  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp lasmerge ../bin
g++  -c -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG   -I../LASzip/src -I../LASlib/inc  lasindex.cpp -o lasindex.o
lasindex.cpp:143:25: warning: illegal character encoding in character literal [-Winvalid-source-encoding]
      if (argv[i][0] == '<96>') argv[i][0] = '-';
                        ^
1 warning generated.
g++  -O3 -Wall -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-unused-result -DNDEBUG  lasindex.o -llas -o lasindex  -L../LASlib/lib  -I../LASzip/src -I../LASlib/inc 
cp lasindex ../bin

I got a bunch of warnings which I did not really investigate. Now I have the base open source tools available:

$ ls -lrt bin 
total 241744
-rw-rw-r--@ 1 albert  staff   167936 Nov  5  2017 unzip.exe
...
-rw-rw-r--@ 1 albert  staff    11060 Jan 28 13:29 lasdatum_README.txt
-rwxr-xr-x  1 albert  staff  1512476 Mar 16 19:57 laszip
-rwxr-xr-x  1 albert  staff  1596164 Mar 16 19:57 lasinfo
-rwxr-xr-x  1 albert  staff  1497892 Mar 16 19:57 lasprecision
-rwxr-xr-x  1 albert  staff  1342004 Mar 16 19:57 las2txt
-rwxr-xr-x  1 albert  staff  1501860 Mar 16 19:57 txt2las
-rwxr-xr-x  1 albert  staff  1518540 Mar 16 19:57 las2las
-rwxr-xr-x  1 albert  staff  1350300 Mar 16 19:57 lasdiff
-rwxr-xr-x  1 albert  staff  1489564 Mar 16 19:57 lasmerge
-rwxr-xr-x  1 albert  staff  1279636 Mar 16 19:57 lasindex

Let’s try some:

$ bin/las2txt -i data/test.laz -parse Mxyzrna -stdout | more
1 2483574.60 366588.90 1481.48 1 1 10
2 2483576.27 366591.97 1481.60 1 1 10
3 2483573.13 366596.85 1483.76 1 1 10
4 2483570.10 366601.54 1484.44 1 1 10
5 2483570.89 366610.41 1493.16 1 1 10
6 2483573.14 366607.31 1503.69 1 2 10

$ bin/lasinfo data/test.laz
lasinfo (210128) report for 'data/test.laz'
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.0
  system identifier:          ''
  generating software:        'TerraScan'
  file creation day/year:     1/1
  header size:                227
  offset to point data:       901
  number var. length records: 5
  point data format:          0
  point data record length:   20
  number of point records:    11781
  number of points by return: 8513 2693 575 0 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               -0 -0 -0
  min x y z:                  2483569.14 366203.87 1480.88
  max x y z:                  2484009.38 366616.60 1581.78
variable length header record 1 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  192
  description          'GeoTiff Projection Keys'
    GeoKeyDirectoryTag version 1.1.0 number of keys 23
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 2048 tiff_tag_location 0 count 1 value_offset 4269 - GeographicTypeGeoKey: GCS_NAD83
      key 2049 tiff_tag_location 34737 count 24 value_offset 54 - GeogCitationGeoKey: GCS_North_American_1983
      key 2050 tiff_tag_location 0 count 1 value_offset 6269 - GeogGeodeticDatumGeoKey: Datum_North_American_Datum_1983
      key 2051 tiff_tag_location 0 count 1 value_offset 8901 - GeogPrimeMeridianGeoKey: PM_Greenwich
      key 2054 tiff_tag_location 0 count 1 value_offset 9102 - GeogAngularUnitsGeoKey: Angular_Degree
      key 2055 tiff_tag_location 34736 count 1 value_offset 11 - GeogAngularUnitSizeGeoKey: 0.01745329252
      key 2056 tiff_tag_location 0 count 1 value_offset 7019 - GeogEllipsoidGeoKey: Ellipse_GRS_1980
      key 2057 tiff_tag_location 34736 count 1 value_offset 8 - GeogSemiMajorAxisGeoKey: 6378137
      key 2059 tiff_tag_location 34736 count 1 value_offset 9 - GeogInvFlatteningGeoKey: 298.2572221
      key 2061 tiff_tag_location 34736 count 1 value_offset 10 - GeogPrimeMeridianLongGeoKey: 0
      key 3072 tiff_tag_location 0 count 1 value_offset 32128 - ERROR: cannot open 'pcs.csv' file. maybe your LAStools distribution
       has no .\LAStools\bin\serf\geo\pcs.csv file. download the
       latest version at http://lastools.org/download/LAStools.zip
set_ProjectedCSTypeGeoKey: look-up for 32128 not implemented
ProjectedCSTypeGeoKey: look-up for 32128 not implemented
      key 3073 tiff_tag_location 34737 count 54 value_offset 0 - PCSCitationGeoKey: NAD_1983_StatePlane_Pennsylvania_North_FIPS_3701_Feet
      key 3075 tiff_tag_location 0 count 1 value_offset 8 - ProjCoordTransGeoKey: CT_LambertConfConic_2SP
      key 3076 tiff_tag_location 0 count 1 value_offset 9003 - ProjLinearUnitsGeoKey: Linear_Foot_US_Survey
      key 3077 tiff_tag_location 34736 count 1 value_offset 7 - ProjLinearUnitSizeGeoKey: 0.3048006096
      key 3078 tiff_tag_location 34736 count 1 value_offset 3 - ProjStdParallel1GeoKey: 40.88333333
      key 3079 tiff_tag_location 34736 count 1 value_offset 4 - ProjStdParallel2GeoKey: 41.95
      key 3081 tiff_tag_location 34736 count 1 value_offset 6 - ProjNatOriginLatGeoKey: 40.16666667
      key 3082 tiff_tag_location 34736 count 1 value_offset 0 - ProjFalseEastingGeoKey: 1968500
      key 3083 tiff_tag_location 34736 count 1 value_offset 1 - ProjFalseNorthingGeoKey: 0
      key 3088 tiff_tag_location 34736 count 1 value_offset 2 - ProjCenterLongGeoKey: -77.75
      key 3093 tiff_tag_location 34736 count 1 value_offset 5 - ProjScaleAtCenterGeoKey: 0
variable length header record 2 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34736
  length after header  96
  description          'GeoTiff double parameters'
    GeoDoubleParamsTag (number of doubles 12)
      1.9685e+06 0 -77.75 40.8833 41.95 0 40.1667 0.304801 6.37814e+06 298.257 0 0.0174533 
variable length header record 3 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34737
  length after header  78
  description          'GeoTiff ASCII parameters'
    GeoAsciiParamsTag (number of characters 78)
      NAD_1983_StatePlane_Pennsylvania_North_FIPS_3701_Feet|GCS_North_American_1983|
variable length header record 4 of 5:
  reserved             43707
  user ID              'NIIRS10'
  record ID            4
  length after header  10
  description          'NIIRS10 Timestamp'
variable length header record 5 of 5:
  reserved             43707
  user ID              'NIIRS10'
  record ID            1
  length after header  26
  description          'NIIRS10 Tile Index'
the header is followed by 2 user-defined bytes
LASzip compression (version 1.0r0 c1): POINT10 1
reporting minimum and maximum for all LAS point record entries ...
  X           248356914  248400938
  Y            36620387   36661660
  Z              148088     158178
  intensity           0        194
  return_number       1          3
  number_of_returns   1          3
  edge_of_flight_line 0          0
  scan_direction_flag 0          1
  classification      1         15
  scan_angle_rank    10         15
  user_data           0          0
  point_source_ID   238        239
number of first returns:        8513
number of intermediate returns: 866
number of last returns:         7489
number of single returns:       5087
overview over number of returns of given pulse: 5087 4226 2468 0 0 0 0
histogram of classification of points:
            2020  unclassified (1)
            4597  ground (2)
             668  keypoint (8)
              27  water (9)
            4292  overlap (12)
             177  tower (15)

The basic functions seems to work fine. Obviously, running the other tools that are compiled for Windows only is not possible (other than via a windows VM which would be really overkill). Then again, building the whole set of tools for macOS does not look like an impossible task. The interesting exercise is to now build the open source tools for an M1 mac (I did this on a Intel-X64 mac).

Albert

Antoine Cottin

unread,
Mar 17, 2021, 7:36:02 AM3/17/21
to last...@googlegroups.com
Hi Albert, Hi Martin,

I can confirm that if works on MacBook Pro M1 laptop. Just compiled it and run the same test as Albert.
Same warnings and same test results.

Have a nice one.
Antoine.

Albert Godfrind

unread,
Mar 17, 2021, 3:12:01 PM3/17/21
to last...@googlegroups.com
That’s great to know.

It would be nice doing some performance benchmarking on a M1. I think it should perform nicely. Probably better than an X64.

Albert
--

Albert Godfrind | Geospatial and Graph technologies
Tel: +33 1 57 60 86 16 | Mobile: +33 6 09 97 27 23 | Twitter: @agodfrin
ORACLE | Centre Régus - Nova Antipolis | 291 Rue Albert Caquot | 06560 Sophia Antipolis | France

Joseph P

unread,
May 4, 2021, 8:03:59 PM5/4/21
to LAStools - efficient tools for LiDAR processing
It worked for me too. Thanks for sharing 
Reply all
Reply to author
Forward
0 new messages