ubuntu下安装Liblas库!

一、下载最新版liblas源码

下载地址:https://liblas.org/download.html

二、必备条件: 

CMake 2.8.1+以及C/C++编译器

三、编译

1.首先,你必须已经安装1.38.0及以上版本的Boost库。没有安装的可以参考我的博客:ubuntu:安装boost库 v1.70

2.然后执行如下命令:

cd liblas
mkdir makefiles
cd makefiles
cmake -G "Unix Makefiles" ../

完了以后:

make

再然后:

make install

四、测试

输入如下命令:

lasinfo ../test/data/TO_core_last_clip.las

会输出如下类似信息:

---------------------------------------------------------
  Header Summary
---------------------------------------------------------
  File Name: ../test/data/TO_core_last_clip.las
  Version:                    1.0
  Source ID:                  0
  Reserved:                   0
  Project ID/GUID:           '00000000-0000-0000-0000-000000000000'
  System Identifier:         ''
  Generating Software:       'TerraScan'
  File Creation Day/Year:    0/0
  Header Size                227
  Offset to Point Data       229
  Number Var. Length Records 0
  Point Data Format          1
  Point Data Record Length   28
  Number of Point Records    213093
  Number of Points by Return 128621 84472 0 0 0
  Scale Factor X Y Z         0.01 0.01 0.01
  Offset X Y Z               -0.000000 -0.000000 -0.000000
  Min X Y Z                  630250.000000 4834500.000000 46.830000
  Max X Y Z                  630500.000000 4834750.000000 170.650000
 Spatial Reference
Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      End_Of_Tags.
   Keyed_Information:
      End_Of_Keys.
   End_Of_Geotiff.

---------------------------------------------------------
  Point Inspection Summary
---------------------------------------------------------
  Header Point Count: 213093
  Actual Point Count: 213093

  Minimum and Maximum Attributes (min,max)
---------------------------------------------------------
  Min X,Y,Z:        630250.000000,4834500.000000,46.830000
  Max X,Y,Z:        630500.000000,4834750.000000,170.650000
  Bounding Box:     630250.00,4834500.00,630500.00,4834750.00
  Time:         413162.560400,414095.322000
  Return Number:    1,2
  Return Count:     1,2
  Flightline Edge:  0,0
  Intensity:        10,50200
  Scan Direction Flag:  0,0
  Scan Angle Rank:  0,0
  Classification:   1,1
  Point Source Id:  0,0
  Minimum Color:     0 0 0
  Maximum Color:     0 0 0

  Number of Points by Return
---------------------------------------------------------
    (0) 128621  (1) 84472   (2) 0   (3) 0   (4) 0
 Total Points: 213093

  Number of Returns by Pulse
---------------------------------------------------------
    (1) 128621  (2) 84472   (3) 0   (4) 0   (5) 0   (6) 0   (7) 0
 Total Pulses: 213093

  Point Classifications
---------------------------------------------------------
      213093 Unclassified (1)

大功告成!觉得不错的点个赞哦!

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值