Opengeo suite has provided a tutorial on how to manage LiDAR data using postgresql. I was trying to follow the tutorial in this link.

I am new to Linux and using Ubuntu 12.04. I have successfully installed Opengeo suite 4.1. I started off with the tutorial smoothly, installed point cloud extension and pdal and downloaded the example data. I only got stuck at the section "Loading LiDAR into the database". In this section, I followed the tutorial and implemented following codes successfully:

CREATE EXTENSION pointcloud_postgis;

And also the following pdal commands run smoothly:

pdal info --input 20090429_42122c8225_ld_p23.laz --schema
pdal info --input 20090429_42122c8225_ld_p23.laz --metadata --xml

Now I faced the issue while implementing the following command:

pdal pipeline laz2pg.xml

From the terminal I got the error:

mzaman@ubuntu:~/Downloads$ pdal pipeline laz2pg.xml Caught PDAL exception: unable to connect to database

This is to mention that, I have created a database in Postgresql called 'LiDAR' using pgAdmin. I kept another terminal open and run the following command using users 'postgres' and 'mzaman'.

mzaman@ubuntu:~/Downloads$ sudo -u mzaman psql LiDAR

psql (9.3.4) Type "help" for help. LiDAR=#

I also tried with the user 'postgres',

entermzaman@ubuntu:~/Downloads$ sudo -u postgres psql LiDAR

But the first terminal where I run pdal command, still shows the error:

Caught PDAL exception: unable to connect to database.

My question is, how to bypass this error?

  • You need to do it as postgres user.
    – user40499
    Commented Nov 12, 2014 at 15:03

1 Answer 1


Great to find you here.

Have you edited the laz2pg.xml to point to your DB? You mentioned you created a database and named it "LiDAR" while the tutorial named the database "lidar". In linux world I believe "LiDAR" != "lidar".

<Option name="connection">dbname='lidar' user='postgres'</Option>

Try changing that line to:

<Option name="connection">dbname='LiDAR' user='postgres'</Option>


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.