These are chat archives for PDAL/PDAL

30th
Nov 2017
Kevin Beam
@kbeamnsidc
Nov 30 2017 17:35
I'm trying to run a pdal pipeline using the pgpointcloud reader. If I run it, or run it with --validate, I get:
PDAL: readers.pgpointcloud: Unable to fetch pcid with column 'pa' and table 'atm1b'
It seems that the reader is running the query
SELECT PC_Typmod_Pcid(a.atttypmod) AS pcid FROM pg_class c, pg_attribute a WHERE c.relname = 'atm1b' AND a.attname = 'pa' AND a.attrelid = c.oid;
Which for me returns null. I.e., running the query
SELECT a.atttypmod FROM pg_class c, pg_attribute a WHERE c.relname = 'atm1b' AND a.attname = 'pa' AND a.attrelid = c.oid;
returns -1. In this case the pgpointcloud reader throws an exception. Is this something wrong with the setup of my pointcloud table, or...?
Kevin Beam
@kbeamnsidc
Nov 30 2017 17:44
I think I see that it's a problem with my table. I created it via:
CREATE TABLE IF NOT EXISTS atm1b ( id SERIAL PRIMARY KEY, pa PCPATCH );
and I should have specified the pcid on the PCPATCH type like pa PCPATCH(1).
Andrew Bell
@abellgithub
Nov 30 2017 18:49
@kbeamnsidc : Just so you know, you don't have to create the table yourself. PDAL will create it when it writes points.
Kevin Beam
@kbeamnsidc
Nov 30 2017 20:22
Ah, thanks, I didn't know that. Do you (or anyone) know if I can safely do something like:
alter table atm1b alter column pa set data type PCPATCH(1);
if I have data in the table? I'm going to try it in a dev db instance.