从las格式数据提取xyz和c类别信息过程遇到问题及解决方法
作者:互联网
利用liblas库实现las格式文件处理.
安装laslib库遇到问题如下,也不知道安装对没有:
命令:~/Downloads/libLAS-1.8.1/makefiles$ cmake ..
报错:
-- Searching for GeoTIFF 1.3.0+ library
-- Could NOT find GeoTIFF (missing: GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR) (Required is at least version "1.3.0")
CMake Error at CMakeLists.txt:280 (message):
Unable to find sufficient GeoTIFF
-- Configuring incomplete, errors occurred!
法2:
1,在https://github.com/LAStools/LAStools 下载,解压,命令行进入解压后文件夹所在目录
2,cd LASlib && make,cd LASzip && make,cd src && make这几行命令用来编译并得到LASlib.a,LASlib的静态库
---------------------
作者:Handsome灬Harry
来源:CSDN
原文:https://blog.csdn.net/u013313528/article/details/81781570
版权声明:本文为博主原创文章,转载请附上博文链接!
运行信息:
lasdiff.cpp:109:8: warning: variable ‘verbose’ set but not used [-Wunused-but-set-variable]
bool verbose = false;
^
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
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
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
make[1]: Leaving directory '/home/yukun/Downloads/LAStools-master/src'
换种方式:
命令:lasinfo 20170511.las(磁盘文件)
结果:
The program 'lasinfo' is currently not installed. You can install it by typing:
sudo apt install liblas-bin
再运行:sudo apt install liblas-bin
结果(貌似就自己装好了):
setting up liburiparser1:amd64 (0.8.4-1) ...
Setting up libkmlbase1:amd64 (1.3.0-1) ...
Setting up libkmldom1:amd64 (1.3.0-1) ...
Setting up libkmlengine1:amd64 (1.3.0-1) ...
Setting up libogdi3.2 (3.2.0~beta2-7.1build1) ...
Setting up libopenjp2-7:amd64 (2.1.0-2.1) ...
Setting up libspatialite7:amd64 (4.3.0a-5) ...
Setting up libxerces-c3.1:amd64 (3.1.3+debian-1) ...
Setting up libgdal1i (1.11.3+dfsg-3build2) ...
Setting up libgeotiff2:amd64 (1.4.1-2) ...
Setting up liblas3 (1.8.0-7build1) ...
Setting up liblas-c3 (1.8.0-7build1) ...
Setting up liblas-bin (1.8.0-7build1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
再运行lasinfo 20170511.las(磁盘文件),就跑出如下结果
---------------------------------------------------------
Header Summary
---------------------------------------------------------
Version: 1.2
Source ID: 0
Reserved: 0
Project ID/GUID: '00000000-0000-0000-0000-000000000000'
System ID: ''
Generating Software: 'TerraScan'
File Creation Day/Year: 131/2017
Header Byte Size 227
Data Offset: 229
Header Padding: 2
Number Var. Length Records: None
Point Data Format: 1
Number of Point Records: 222402675
Compressed: False
Number of Points by Return: 213920899 7536639 834914 101826 8397
Scale Factor X Y Z: 0.01000000000000 0.01000000000000 0.01000000000000
Offset X Y Z: -0.00 -0.00 -0.00
Min X Y Z: 446016.63 3642012.20 0.33
Max X Y Z: 447868.40 3664212.80 101.46
Spatial Reference: None
所以最后一句话总结: sudo apt install liblas-bin
标签:...,..,LASlib,xyz,Wno,up,Setting,格式,las 来源: https://blog.csdn.net/qq_28809935/article/details/96869394