我在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安装?
EDITpdal info install/PDAL/test/data/las/autzen_trim.las
完全可以。
上帝保佑谷歌!
通过阅读这个、这个和这个找到了解决方案。
只需更改为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