0

我在我的 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一切正常。

4

1 回答 1

1

上帝保佑谷歌!

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

只需要更改为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
于 2020-07-24T18:49:24.093 回答