【问题标题】:build PDAL with LAZperf使用 LAZperf 构建 PDAL
【发布时间】:2020-11-14 16:02:05
【问题描述】:

我正在我的 Ubuntu 18 中以这种方式构建 PDAL:

cd /home/magno/install && \
    git clone https://github.com/hobu/laz-perf.git  && \
    cd laz-perf && \
    mkdir build && \
    cd build && \
    cmake .. \
    -DEMSCRIPTEN=1 \
    -DCMAKE_TOOLCHAIN_FILE=/home/magno/install/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake && \
    VERBOSE=1 make && \
    make install

cd /home/magno/install && \
    git clone https://github.com/pgpointcloud/pointcloud && \
    cd pointcloud && \
    ./autogen.sh && \
    ./configure --with-lazperf=/usr/local/ && \
    make && \
    make install

cd /home/magno/install && \
    git clone https://github.com/PDAL/PDAL.git && \
    cd PDAL && \
    mkdir build && \
    cd build && \
    cmake -G Ninja .. && \
    ninja && \
    ninja install

运行PGUSER=postgres PGPASSWORD=*** PGHOST=localhost PGPORT=5432 ctest 可以确认一切正常。

但是当我尝试检查 LAZ 文件时,我收到了这个错误:

PDAL: readers.las: Can't read compressed file without LASzip or LAZperf decompression library.

这是我的管道文件:

{
  "pipeline":[
    {
      "type":"readers.las",
      "filename":"airport.laz",
      "spatialreference":"EPSG:32616",
      "compression":"lazperf"
    },
    {
      "type":"writers.pgpointcloud",
      "connection":"dbname=mydb host='localhost' user='postgres' password='****'",
      "table":"patchs",
      "compression":"lazperf",
      "srid":"32616",
      "overwrite":"false"
    }
  ]
}

我认为 lazperf 还可以,因为 pgpointcloud 不会向 PGUSER=postgres PGPASSWORD=**** PGHOST=localhost make installcheck 抱怨并告诉我:

#  PointCloud is now configured for 
# -------------- Compiler Info ------------- 
#  C compiler:           gcc -g -O2
#  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P
# -------------- Dependencies -------------- 
#  PostgreSQL config:    /usr/bin/pg_config
#  PostgreSQL version:   PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) (120)
#  Libxml2 config:       /usr/bin/xml2-config
#  Libxml2 version:      2.9.4
#  LazPerf status:       /usr/local//include/laz-perf
#  CUnit status:         enabled

PDAL 测试没有告诉我关于压缩的任何信息。

我如何构建或告诉 PDAL 我的 LAZPerf 安装?

编辑pdal info install/PDAL/test/data/las/autzen_trim.las 一切正常。

【问题讨论】:

    标签: compression gdal pdal


    【解决方案1】:

    上帝保佑谷歌!

    通过阅读thisthisthis找到了解决方案。

    只需要改成cmake -G Ninja -DLazperf_DIR=/usr/local/ -DWITH_LAZPERF=ON ..

    然后瞧:

    -- The following OPTIONAL packages have been found:
    
     * Lazperf
     * ZSTD
       General compression support
     * LibXml2
     * PkgConfig
     * PythonInterp
    

    【讨论】:

      猜你喜欢
      • 2018-12-24
      • 2018-12-08
      • 2021-10-29
      • 2019-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-03
      • 2019-05-28
      相关资源
      最近更新 更多